@pyramid-embed/embed-js
Advanced tools
Comparing version 2.0.20 to 2.0.21
@@ -175,6 +175,15 @@ import { __awaiter, __generator } from "tslib"; | ||
return; | ||
var scriptElem = document.createElement("script"); | ||
scriptElem.src = host + "no-shell/embed.js"; | ||
scriptElem.async = true; | ||
document.head.appendChild(scriptElem); | ||
var headExists = false; | ||
Array.from(document.querySelectorAll("script")).forEach(function (x) { | ||
var _a; | ||
if ((_a = x.src) === null || _a === void 0 ? void 0 : _a.includes("no-shell/embed.js")) { | ||
headExists = true; | ||
} | ||
}); | ||
if (!headExists) { | ||
var scriptElem = document.createElement("script"); | ||
scriptElem.src = host + "no-shell/embed.js"; | ||
scriptElem.async = true; | ||
document.head.appendChild(scriptElem); | ||
} | ||
} | ||
@@ -190,4 +199,4 @@ function tryLoadStaticEmbed() { | ||
} | ||
(function () { | ||
document.addEventListener("DOMContentLoaded", function (event) { | ||
tryLoadStaticEmbed(); | ||
})(); | ||
}); |
{ | ||
"name": "@pyramid-embed/embed-js", | ||
"version": "2.0.20", | ||
"version": "2.0.21", | ||
"main": "dist/index.js", | ||
@@ -11,2 +11,3 @@ "scripts": { | ||
"build:global": "webpack -p --config webpack.global.js", | ||
"build:global:dev": "webpack -p --config webpack.global.dev.js", | ||
"postinstall": "npm prune" | ||
@@ -26,3 +27,4 @@ }, | ||
"webpack": "4.41.5", | ||
"webpack-cli": "3.3.10" | ||
"webpack-cli": "3.3.10", | ||
"webpack-merge": "4.2.2" | ||
}, | ||
@@ -29,0 +31,0 @@ "files": [ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
114451
25
432
6