Redigera

JSObject Class

Definition

Represents a reference to an object in the JavaScript host environment and enables interaction with it as a proxy.

public ref class JSObject : IDisposable
[System.Runtime.Versioning.SupportedOSPlatform("browser")]
public class JSObject : IDisposable
[<System.Runtime.Versioning.SupportedOSPlatform("browser")>]
type JSObject = class
    interface IDisposable
Public Class JSObject
Implements IDisposable
Inheritance
JSObject
Attributes
Implements

Remarks

JSObject instances are expensive, so use Dispose() to release instances once you no longer need to retain a reference to the target object.

Properties

IsDisposed

Gets a value that indicates whether the proxy was already disposed.

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetPropertyAsBoolean(String)

Returns the value of the specified property as Boolean if the property exists, otherwise false.

GetPropertyAsByteArray(String)

Returns the value of the specified property as a Byte array if the property exists, otherwise null.

GetPropertyAsDouble(String)

Returns the value of the property as Double if the property exists, otherwise 0.

GetPropertyAsInt32(String)

Returns the value of the property as Int32 if the property exists, otherwise 0.

GetPropertyAsJSObject(String)

Returns the value of the property as JSObject proxy if the property exists, otherwise null.

GetPropertyAsString(String)

Returns the value of the property as String if the property exists, otherwise null.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetTypeOfProperty(String)

Returns typeof() of the property.

HasProperty(String)

Checks whether the target object or one of its prototypes has a property with the specified name.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetProperty(String, Boolean)

Defines a new property on the target object, or modifies an existing property to have the specified value.

SetProperty(String, Byte[])

Defines a new property on the target object, or modifies an existing property to have the specified value.

SetProperty(String, Double)

Defines a new property on the target object, or modifies an existing property to have the specified value.

SetProperty(String, Int32)

Defines a new property on the target object, or modifies an existing property to have the specified value.

SetProperty(String, JSObject)

Defines a new property on the target object, or modifies an existing property to have the specified value.

SetProperty(String, String)

Defines a new property on the target object, or modifies an existing property to have the specified value.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to