fix page-script to support type attribute on inline scripts
This commit is contained in:
parent
0aa690b3b1
commit
b7a41bddec
|
@ -96,13 +96,14 @@ function scriptExists(pageScriptInfo) {
|
|||
function injectScript(pageScriptInfo) {
|
||||
return new Promise((resolve, reject) => {
|
||||
var script = document.createElement("script");
|
||||
script.async = false;
|
||||
|
||||
if (pageScriptInfo.src !== "") {
|
||||
script.src = pageScriptInfo.src;
|
||||
script.async = false;
|
||||
if (pageScriptInfo.type !== "") {
|
||||
script.type = pageScriptInfo.type;
|
||||
}
|
||||
|
||||
if (pageScriptInfo.src !== "") {
|
||||
script.src = pageScriptInfo.src;
|
||||
if (pageScriptInfo.integrity !== "") {
|
||||
script.integrity = pageScriptInfo.integrity;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user