JsProxy Class

A Proxy exotic object (https://tc39.es/ecma262/#sec-proxy-object-internal-methods-and-internal-slots): its internal methods call the traps of its handler, and check the invariants of the internal methods against its target.

public sealed class JsProxy : JsObject
Inheritance
JsObject JsProxy

Properties

NameDescription
CreationRealmGets the realm in which the proxy was created (the current realm of ProxyCreate). A host uses it as the associated realm of a revoked proxy, whose prototype chain cannot be read.
HandlerGets the handler of the proxy ([[ProxyHandler]]), or null when the proxy is revoked.
IsRevokedGets whether the proxy is revoked.
TargetGets the target of the proxy ([[ProxyTarget]]), or null when the proxy is revoked.

CreationRealm

JsProxy.cs

Gets the realm in which the proxy was created (the current realm of ProxyCreate). A host uses it as the associated realm of a revoked proxy, whose prototype chain cannot be read.

public JsRealm? CreationRealm { get; }

Property value

JsRealm?

Handler

JsProxy.cs

Gets the handler of the proxy ([[ProxyHandler]]), or null when the proxy is revoked.

public JsObject? Handler { get; }

Property value

JsObject?

IsRevoked

JsProxy.cs

Gets whether the proxy is revoked.

public bool IsRevoked { get; }

Property value

bool

Gets the target of the proxy ([[ProxyTarget]]), or null when the proxy is revoked.

public JsObject? Target { get; }

Property value

JsObject?