Monkey patch XMLHTTPRequest.onreadystatechange

后端 未结 3 1129
半阙折子戏
半阙折子戏 2020-12-16 04:35

How would go about monkey patching the XMLHTTPRequest\'s onreadystatechange function. I\'m trying to add a function that would be called when every

3条回答
  •  心在旅途
    2020-12-16 05:23

    Assuming you can ignore IE...

    //Totally untested code, typed at the SO