skip to Main Content

How can I proxy Function.prototype in Javascript?

I tried to proxy Function.prototype. I created a new Proxy and rewrote the toString method, however console.log('cas') doesn't work, why? Function.prototype = new Proxy(Function.prototype, { get: function(target, property, receiver) {}, set: function(target, property, value, receiver) { console.log('cas') } }) Function.prototype._toString…

VIEW QUESTION
Back To Top
Search