Click or drag to resize

IJsMap Interface

A JavaScript map.

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

The IJsMap type exposes the following members.

Properties
  NameDescription
Public propertyCount
Gets the number of key-value mappings in this IJsMap.
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 element with the specified key. If this map contains a value associated with the key, it will be replaced.
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 methodClear
Removes all items from this IJsMap. Does nothing if the map is empty.
Public methodContainsKey
Determines whether the IJsMap contains an element with the specified key.
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 methodRemove
Removes the element with the specified key from the IJsMap.
Public methodToReadOnlyDictionary
Copies the contents of the IJsMap to a new IReadOnlyDictionaryTKey, TValue.
Public methodToReadOnlyDictionaryTKey, TVal
Copies the contents of the IJsMap to a new IReadOnlyDictionaryTKey, TValue.
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
A map 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