1 2 3 4 5 6 7 8 9 10 11
var active = true; onmessage = function (e) { if (e.data == "finish") { active = false; return; } if (active) { postMessage(navigator.languages); } };