Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
michael@0 | 1 | <html class="reftest-wait"><head><title>Testcase bug 293388 - Overwriting of div innerHTML cause starting of the loading icon(circle) and some times browser can crash [@ nsRange::DeleteContents]</title></head> |
michael@0 | 2 | <script> |
michael@0 | 3 | function reallyClear() |
michael@0 | 4 | { |
michael@0 | 5 | var par = document.getElementById("par"); |
michael@0 | 6 | var range = document.createRange(); |
michael@0 | 7 | range.selectNodeContents(par); |
michael@0 | 8 | range.deleteContents(); |
michael@0 | 9 | document.documentElement.removeAttribute("class"); |
michael@0 | 10 | } |
michael@0 | 11 | |
michael@0 | 12 | function clear() |
michael@0 | 13 | { |
michael@0 | 14 | document.body.removeEventListener("DOMNodeRemoved", clear, false); |
michael@0 | 15 | reallyClear(); |
michael@0 | 16 | } |
michael@0 | 17 | |
michael@0 | 18 | function init() |
michael@0 | 19 | { |
michael@0 | 20 | document.body.addEventListener("DOMNodeRemoved", clear, false); |
michael@0 | 21 | } |
michael@0 | 22 | |
michael@0 | 23 | </script> |
michael@0 | 24 | <body onload="init(); setTimeout(reallyClear, 10);"> |
michael@0 | 25 | <div id="par"><span>1</span><span>2</span></div> |
michael@0 | 26 | </body></html> |