diff --git a/assets/webio/unsafe_script.js b/assets/webio/unsafe_script.js index 3cb7a89d..e9e77880 100644 --- a/assets/webio/unsafe_script.js +++ b/assets/webio/unsafe_script.js @@ -26,7 +26,13 @@ if (!webComponentsSupported) { var script = document.createElement('script'); script.async = true; - script.src = '/pkg/WebIO/webio/dist/webcomponents-lite.min.js'; + + if ( document.getElementsByTagName("base").length === 0 ) { + script.src = '/pkg/WebIO/webio/dist/webcomponents-lite.min.js'; + } else { + script.src = 'pkg/WebIO/webio/dist/webcomponents-lite.min.js'; + } + document.head.appendChild(script); document.addEventListener("WebComponentsReady", function () { if (customElements.get("unsafe-script") === undefined) {