JavaScript ProxyHandler : Object
The ProxyHandler is used by Proxy to intercept and modify the behavior of the proxied object.
You may use any JavaScript object as a ProxyHandler. If any of the following methods are not provided, the Proxy
will use the default behavior for that method.
Instance Methods
Called when proxy(...)
, proxy.apply(thisArg, parameters)
, or proxy.call(thisArg, ...parameters)
are called.
Example:
RunResults:
Called when delete proxy[name]
is called. Return true
if the delete was successful.
Example:
RunResults:
Called when reading the name
property of the target
of the proxy. The return value is
used as the value of the property.
Example:
RunResults:
Called when Object.keys()
, Object.getOwnPropertyNames()
, or Object.getOwnPropertySymbols()
are called on the proxy.
Example:
RunResults:
Called when Object.preventExtensions()
is called on the Proxy. Return true
if preventExtensions succeeded.
Example:
RunResults:
Copyright © PUBLIC Contributors