JSProxy structure
Enables creation of JS Proxy objects with C# handler callbacks.
C#
public struct JSProxy : IJSValue<JSProxy>Public Members
| name | description |
|---|---|
| JSProxy(…) | Creates a new JS proxy for a target. |
| As<T>() | Tries to create a T struct from this instance. It returns null if the T struct cannot be created. |
| AsUnchecked<T>() | Creates a T struct from this instance without checking the enclosed handle type. It must be used only when the handle type is known to be correct. |
| CastTo<T>() | Creates a T struct from this instance. It throws InvalidCastException in case of failure. |
| Equals(…) | Compares two JS values using JS "strict" equality. |
| override Equals(…) | |
| override GetHashCode() | |
| Is<T>() | Checks if the T struct can be created from this instance`. |
| Revoke() | Revokes the proxy, so that further access to the target is no longer trapped by the proxy handler. |
| operator == | Compares two JS values using JS "strict" equality. |
| explicit operator | Explicitly converts a JSValue to a nullable JSProxy. (2 operators) |
| implicit operator | Implicitly converts a JSProxy to a JSValue. |
| operator != | Compares two JS values using JS "strict" equality. |
| delegate Apply | |
| delegate Construct | |
| delegate DefineProperty | |
| delegate DeleteProperty | |
| delegate Get | |
| delegate GetOwnPropertyDescriptor | |
| delegate GetPrototypeOf | |
| class Handler | Specifies handler callbacks (traps) for a JS proxy. |
| delegate Has | |
| delegate IsExtensible | |
| delegate OwnKeys | |
| delegate PreventExtensions | |
| delegate Set | |
| delegate SetPrototypeOf |
See Also
- interface IJSValue<TSelf>
- namespace Microsoft.JavaScript.NodeApi
- JSProxy.cs