Delegates property access of proxy to given source object. The proxy.prototype is set to the given source object.
proxy
source
the object which should be wrapped.
the proxy.
const src = {x: 1};const proxy = { y: 2};const a = delegate(src, proxy);a === proxy // -> truea.y // -> 2a.x // -> 1 Copy
const src = {x: 1};const proxy = { y: 2};const a = delegate(src, proxy);a === proxy // -> truea.y // -> 2a.x // -> 1
a prepared proxy
const src = {x: 1};const proxy = { y: 2};const a = delegate(src, proxy);a === proxy; // -> truea.y // -> 2a.x // -> 1 Copy
const src = {x: 1};const proxy = { y: 2};const a = delegate(src, proxy);a === proxy; // -> truea.y // -> 2a.x // -> 1
Delegates property access of
proxy
to givensource
object. The proxy.prototype is set to the givensource
object.