Can I intercept a function called directly?

后端 未结 4 524
谎友^
谎友^ 2020-12-05 07:27

In this code I created a function called someFunction. Then I modified Function.prototype.apply and call methods. So instead of my function code is working I am running my i

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 08:01

    You could iterate over the global scope and replace any objects of function type you find which aren't "yours".

提交回复
热议问题