Closed mikesamuel closed 5 years ago
This avoids problems proxying functions with local modifications as in
function f() { console.log('f'); } f.apply = function () { console.log('g'); } const p = new Proxy( f, { apply(target, thisArg, args) { return target.apply(thisArg, args); } }); // Logs g p(); const q = new Proxy( f, { apply(target, thisArg, args) { return Reflect.apply(target, thisArg, args); } }); // Logs f q();
Thank you very much. I appreciate you looking at my code.
Yw. It was nice chatting with you at bsides.
This avoids problems proxying functions with local modifications as in