Click or drag to resize

IJsObject Interface

Represents a JavaScript object. Provides access to the object's properties and functions. The JavaScript object is alive until its JavaScript execution context exist. Once execution context is disposed, all JavaScript objects available in the scope of this context will be automatically disposed. If you try to access already disposed object, you will get an ObjectDisposedException.

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

The IJsObject type exposes the following members.

Properties
  NameDescription
Public propertyFrame
Gets the IFrame instance this JavaScript object is bound to.
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.
Top
Methods
  NameDescription
Public methodInvoke(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 JsException with an error message that describes the reason of the exception will be thrown. Same error message will be printed in JavaScript Console.
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.
Public methodInvokeAsync(String, Object)
Asynchronously executes the function with the given methodName and the args in the JavaScript object without blocking the current thread.
Public methodInvokeAsyncT(String, Object)
Asynchronously executes the function with the given methodName and the args in the JavaScript object without blocking the current thread.
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
See Also