WidgetStatusHelper class

Methods

Failure(string, boolean, boolean)

method to encapsulate a failed result for a widget loading operation (load, reload, openLightbox etc)

Success(string)

method to encapsulate a successful result for a widget loading operation (load, reload, openLightbox etc)

Unconfigured()

method to encapsulate a result for a widget loading operation that results in the widget being in an unconfigured state.

Method Details

Failure(string, boolean, boolean)

method to encapsulate a failed result for a widget loading operation (load, reload, openLightbox etc)

static function Failure(message: string, isUserVisible?: boolean, isRichText?: boolean): Promise<WidgetStatus>

Parameters

message

string

message to display as part within the widget error experience.

isUserVisible

boolean

indicates whether the message should be displayed to the user or a generic error message displayed. Defaults to true.

isRichText

boolean

indicates whether the message is an html that can be rendered as a rich experience. Defaults to false. Only trusted extensions are allowed to set this to true. For any 3rd party widgets passing this value as true, it will be ignored.

Returns

Promise<WidgetStatus>

promise encapsulating the status of the widget loading operations.

Success(string)

method to encapsulate a successful result for a widget loading operation (load, reload, openLightbox etc)

static function Success(state?: string): Promise<WidgetStatus>

Parameters

state

string

any state information to be passed to the initiator of the loading call.

Returns

Promise<WidgetStatus>

promise encapsulating the status of the widget loading operations.

Unconfigured()

method to encapsulate a result for a widget loading operation that results in the widget being in an unconfigured state.

static function Unconfigured(): Promise<WidgetStatus>

Returns

Promise<WidgetStatus>

promise encapsulating the status of the widget loading operations.