michael@0: // The page loaded in the browser is jsreftest.html, which is located in michael@0: // js/src/tests. That makes Worker script URLs resolve relative to the wrong michael@0: // directory. workerDir is the workaround. michael@0: workerDir = (document.location.href.replace(/\/[^/?]*(\?.*)?$/, '/') + michael@0: 'js1_8_5/extensions/'); michael@0: