Click or drag to resize

IJsArray Interface

A JavaScript array.

Namespace:  DotNetBrowser.Js.Collections
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.26.0
Syntax
C#
public interface IJsArray : IJsObject, 
	IAutoDisposable

The IJsArray type exposes the following members.

Properties
  NameDescription
Public propertyCount
Gets the number of elements contained in the IJsArray.
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 propertyItem
Gets or sets the array element at the specified index. If there is an existing element at the specified index, it will be replaced. If the index exceeds the array size, the array will be extended and the elements between the last inserted item and the index will be set to null.
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 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 methodToReadOnlyList
Copies the contents of the IJsArray to a new IReadOnlyListT.
Public methodToReadOnlyListT
Copies the contents of the IJsArray to a new IReadOnlyListT.
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
An array object can be passed between .NET and JavaScript as a method argument or a return value.The object lifetime is bound to the lifetime of the frame this object belongs to. When the owner frame is unloaded, all the bound JavaScript objects are automatically disposed.
See Also