Skip to content

Commit

Permalink
Get webcomponents working in safari and firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
djsegal committed Mar 23, 2018
1 parent e4c79c4 commit 3ea1b2c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion assets/webio/unsafe_script.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 3ea1b2c

Please sign in to comment.