only use if(isWebWorker)