Glossary Term
Proxy.revocable()
The Proxy.revocable() static method creates a revocable Proxy object.
The Proxy.revocable() factory function is the same as the Proxy() constructor, except that in addition to creating a proxy object, it also creates a revoke function that can be called to disable the proxy. The proxy object and the revoke function are wrapped in a plain object.
The revoke function does not take any parameters, nor does it rely on the this value. The created proxy object is attached to the revoke function as a private field that the revoke function accesses on itself when called (the existence of the private field is not observable from the outside, but it has implications on how garbage collection happens). The proxy object is not captured within the closure of the revoke function (which will make garbage collection of proxy impossible if revoke is still alive).
Syntax example: Proxy.revocable(target, handler)
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
