1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
<!doctype html> <html> <head><meta charset="utf-8"></head> <script> function hang() { let i = 1; while (i > 0) { i = Date.now(); } } onmessage = hang; </script> <body> <h1>This is an endless JS loop</h1> </body> </html>