Skip to content

Commit d8554fb

Browse files
authored
Revert loader to writing to the document directly (#1703)
* Revert loader to writing to the document directly * Remove URI encoding as the URLs passed are trusted
1 parent 669efc4 commit d8554fb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/mgt/src/bundle/mgt-loader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@
4646

4747
function addScript(src, onload) {
4848
var tag = document.createElement('script');
49-
tag.setAttribute('src', encodeURI(src));
49+
tag.src = src;
5050

5151
// if (onload) {
5252
// tag.addEventListener("load", onload);
5353
// }
5454

55-
document.head.appendChild(tag);
55+
document.write(tag.outerHTML());
5656
}
5757
})();

0 commit comments

Comments
 (0)