Support the web worker context in window.js