Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <title>Loading...</title> | 3 <title>Loading...</title> |
| 4 <script> | 4 <script> |
| 5 window.onbeforeunload = function(e) { while(true); }; | 5 window.onbeforeunload = function(e) { |
| 6 var ms = 1500; | |
|
Charlie Reis
2016/05/19 22:11:56
Please put a comment saying this is expected to be
| |
| 7 ms += new Date().getTime(); | |
|
Charlie Reis
2016/05/19 22:11:56
nit: var finishTime = new Date().getTime() + delay
| |
| 8 while (new Date() < ms) {} | |
| 9 return null; | |
| 10 }; | |
| 6 </script> | 11 </script> |
| 7 </head> | 12 </head> |
| 8 <body> | 13 <body> |
| 9 <p>Navigate to another page to trigger beforeunload handler.</p> | 14 <p>Navigate to another page to trigger beforeunload handler.</p> |
| 10 </body> | 15 </body> |
| 11 </html> | 16 </html> |
| OLD | NEW |