Interface IJsObject
- Namespace
- DotNetBrowser.Js
- Assembly
- DotNetBrowser.dll
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.
public interface IJsObject : IAutoDisposable
- Inherited Members
- Extension Methods
Properties
- Properties
Gets the object properties as a live collection. Modifying this collection will lead to updating the object properties.
Methods
- Invoke(string, params object[])
Executes the function with the given
methodName
and theargs
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.
- InvokeAsync(string, params object[])
Asynchronously executes the function with the given
methodName
and theargs
in the JavaScript object without blocking the current thread.
- InvokeAsync<T>(string, params object[])
Asynchronously executes the function with the given
methodName
and theargs
in the JavaScript object without blocking the current thread.
- Invoke<T>(string, params object[])
Executes the function with the given
methodName
and theargs
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.