Click or drag to resize

IJsPromise Interface

The JavaScript Promise.

Namespace:  DotNetBrowser.Js
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.27.5
Syntax
C#
public interface IJsPromise : IJsObject, 
	IAutoDisposable

The IJsPromise type exposes the following members.

Properties
  NameDescription
Public propertyFrame
Gets the IFrame instance this JavaScript object is bound to.
(Inherited from IJsObject.)
Public propertyIsDisposed
Indicates if the object is already disposed.
(Inherited from IAutoDisposable.)
Public propertyProperties
Gets the object properties as a live collection. Modifying this collection will lead to updating the object properties.
(Inherited from IJsObject.)
Top
Methods
  NameDescription
Public methodCatch(ActionObject)
Appends the rejection handler to the promise.
Public methodCatch(FuncObject, Object)
Appends the rejection handler to the promise.
Public methodFinally(ActionObject)
Appends the handler that will be invoked if the promise is settled (fulfilled/rejected).
Public methodFinally(FuncObject, Object)
Appends the handler that will be invoked if the promise is settled (fulfilled/rejected).
Public methodInvokeT(String, Object)
Executes the function with the given methodName and the args in the JavaScript object. This method blocks current thread execution until the function finishes its execution. If the function raises an exception, then a JsException with an error message that describes the reason of the exception will be thrown. Same error message will be printed in JavaScript Console.
(Inherited from IJsObject.)
Public methodInvokeAsync(String, Object)
Asynchronously executes the function with the given methodName and the args in the JavaScript object without blocking the current thread.
(Inherited from IJsObject.)
Public methodThen(ActionObject, ActionObject)
Appends fulfillment and rejection handlers to the promise.
Public methodThen(FuncObject, Object, FuncObject, Object)
Appends fulfillment and rejection handlers to the promise.
Top
Events
  NameDescription
Public eventDisposed
Occurs when the object has been disposed.
(Inherited from IAutoDisposable.)
Top
Extension Methods
  NameDescription
Public Extension MethodToJsonString
Converts the given JavaScript object into a JSON string.
(Defined by JsonExtensions.)
Top
Remarks

The IJsPromise interface can be used to register .NET delegates as Promise handlers.

See Also