4 var isWorkerFinished
= false;
5 var isContentLoaded
= false;
7 function IsWorkerFinished() {
8 return isWorkerFinished
;
11 function IsContentLoaded() {
12 return isContentLoaded
;
17 worker
= new Worker("REPLACE_WITH_UNSAFE_WORKER_PATH");
18 worker
.onmessage = function(e
) {
19 isContentLoaded
= (e
.data
== "loaded");
20 isWorkerFinished
= true;
25 <body onload=
"test()"></body>