Table of Contents

Method Then

Namespace
DotNetBrowser.Js
Assembly
DotNetBrowser.dll

Then(Action<object>, Action<object>)

Appends fulfillment and rejection handlers to the promise.

IJsPromise Then(Action<object> onFulfilled, Action<object> onRejected = null)

Parameters

onFulfilled Action<object>

The fulfillment handler.

onRejected Action<object>

The rejection handler.

Returns

IJsPromise

A new IJsPromise resolving to the return value of the called handler, or to its original settled value if the promise was not handled.

Exceptions

JsException

The JavaScript function raised an exception.

ObjectDisposedException

The IJsPromise has already been disposed.

ConnectionClosedException

The connection to the Chromium engine is closed.

Then(Func<object, object>, Func<object, object>)

Appends fulfillment and rejection handlers to the promise.

IJsPromise Then(Func<object, object> onFulfilled, Func<object, object> onRejected = null)

Parameters

onFulfilled Func<object, object>

The fulfillment handler.

onRejected Func<object, object>

The rejection handler.

Returns

IJsPromise

A new IJsPromise resolving to the return value of the called handler, or to its original settled value if the promise was not handled.

Exceptions

JsException

The JavaScript function raised an exception.

ObjectDisposedException

The IJsPromise has already been disposed.

ConnectionClosedException

The connection to the Chromium engine is closed.