ASP.NET Core MVC Controls | ComponentOne
In This Topic
    IPromise Interface
    In This Topic
    File
    wijmo.viewer.js
    Module
    wijmo.viewer

    Defines the interface of promise which is used for asynchronous calling.

    Methods

    Methods

    catch

    catch(onRejected?: (reason?: any)): IPromise
    

    Call the function after a promise is rejected.

    Parameters
    • onRejected: (reason?: any) Optional

      The function which will be executed when a promise is rejected. This has a single parameter, the rejection reason. The return value will be passed to the next callback function.

    Returns
    IPromise

    then

    then(onFulfilled?: (value?: any), onRejected?: (reason?: any)): IPromise
    

    Call the function after a promise is fulfilled or rejected.

    Parameters
    • onFulfilled: (value?: any) Optional

      The function which will be executed when a promise is fulfilled. This has a single parameter, the fulfillment value. If a value is returned, it will be passed to the next callback function. If no value is returned, the original value will be passed.

    • onRejected: (reason?: any) Optional

      The function which will be executed when a promise is rejected. This has a single parameter, the rejection reason. If a value is returned, it will be passed to the next callback function. If no value is returned, the original value will be passed.

    Returns
    IPromise