diff --git a/load.js b/load.js index 36e4bbd9f2..21c4d3681a 100644 --- a/load.js +++ b/load.js @@ -26,7 +26,9 @@ (function() { // anonymous namespace // The sources may be in a different folder from the test app. // Compute the base URL for all library sources. - var loaderSrc = document.currentScript.src; + var currentScript = document.currentScript || + document.scripts[document.scripts.length - 1]; + var loaderSrc = currentScript.src; var baseUrl = loaderSrc.split('/').slice(0, -1).join('/') + '/'; function loadScript(src) {