make sure isWebWorker by isFunction(importScripts)