This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| XMLHttpRequest = new Proxy(XMLHttpRequest, { | |
| construct:function(t,a){ | |
| const req = new t(); | |
| return new Proxy(req, { | |
| get:function(o,p){ | |
| if(p=='status')return 9001 | |
| return typeof o[p] == 'function'?o[p].bind(o):o[p] | |
| }, | |
| set: function(target, prop, value) { | |
| Reflect.set(target, prop, value) // or target[prop] = value |