file_suppressed_events_and_scrolling.html (821B)
1 <!DOCTYPE HTML> 2 <html> 3 <body><iframe srcdoc=" 4 <html> 5 <head> 6 <script> 7 onload = function() { 8 // Ensure the layout is up-to-date and painted. 9 requestAnimationFrame(function() { 10 setTimeout(run); 11 }) 12 } 13 14 function run() { 15 parent.opener.postMessage('doscroll', '*'); 16 window.onscroll = function() { 17 parent.opener.postMessage('didscroll', '*'); 18 } 19 let xhr = new XMLHttpRequest(); 20 xhr.open('GET', 'slow.sjs', false); 21 xhr.send(); 22 parent.opener.postMessage('xhr_done', '*'); 23 } 24 </script> 25 </head> 26 <body style='height: 3000px; border: 1px solid black;'> 27 </body> 28 </html> 29 "></iframe></body> 30 </html>