Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const originalTimout = window.setTimeout;
- window.setTimeout = function () {
- if (arguments.callee.caller) {
- console.log("setTimeout", arguments.callee.caller.toString());
- }
- return originalTimout.apply(window, arguments);
- }
- const originalInterval = window.setInterval;
- window.setInterval = function () {
- if (arguments.callee.caller) {
- console.log("setInterval", arguments.callee.caller.toString());
- }
- return originalInterval.apply(window, arguments);
- }
- const originalRaF = window.requestAnimationFrame;
- window.requestAnimationFrame = function (callback) {
- if (arguments.callee.caller) {
- console.log("requestAnimationFrame", arguments.callee.caller.toString());
- }
- return originalRaF(callback);
- }
Add Comment
Please, Sign In to add comment