SetTimeout () and ClearTimeout () to stop IE8 freezing and aobut dialogs overruning scripts

I have third-party software where I can open nsites and run javascript. Since some sites make me overflow the stack, I used the registry trick to change the WRAD Styles to FFFFFF .

However, some sites may perform stack overflow due to the DOM .

I was thinking about starting every site, I would do javascript: SetTimeout ("window.status = 'one';", 10000);

then in the end I would like to clear it - my question is how to do it if it does not have an actual id? Would regular clearTimeout () without anything inside do this fine ?

+3
source share
1 answer

I don't think window.clearTimeout () will do the trick.

However, the ressource identifier is just an integer. In Opera, this is 1, in FireFox 2, in IE a certain amount. Check this out with a script:

<script type="text/javascript">
var test = window.setTimeout(alert, 10000);
alert(test);
</script>

So, if it’s not possible to set a global variable for a timeout, you can simply clear the intervals for each integer from 1 to 5.000.000 or so. This, of course, is not beautiful.

- : ?

0

Source: https://habr.com/ru/post/1743671/


All Articles