I've got into a peculiar situation with Chrome on my Samsung Note 2 running Android 4.4.2. I've been playing with JavaScript and apparently created some bad code. I know it because PhpStorm showed the warning that the code was likely to cause an exception. Still, I've tried seeing this page on my smartphone. (I need the smartphone because I am playing with the navigator.vibration
function.) Chrome crashed.
Now when I run Chrome, it tries to re-open all tabs, the last being the one with the erroneous page (hosted with a web-hosting company). Apparently, Chrome is trying to open the cached page. It makes the whole smartphone practically unresponsive, with app icons sometimes disappearing from the desktop. I can revive the OS by closing Chrome from the app manager (long-press the home key).
I have already corrected the page online, it works fine in a desktop browser. And no warning in PhpStorm any more. But Android Chrome is hopeless. Restarting the phone doesn't help.
I wonder if I can somehow reset Chrome or simply close all tabs without running Chrome itself. It would also be great to understand what could have brought it to this amazing condition.
The problematic code in the page was
while (true) {
navigator.vibrate([500, 500]);
}
I wanted to create an infinite loop (for as long as the tab was open).