@schukai/monster 3.25.0 → 3.26.0
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -969,5 +969,14 @@ function initShadowRoot() {
|
|
969
969
|
*/
|
970
970
|
function registerCustomElement(element) {
|
971
971
|
validateFunction(element);
|
972
|
-
getGlobalObject("customElements")
|
972
|
+
const customElements = getGlobalObject("customElements")
|
973
|
+
if (customElements === undefined) {
|
974
|
+
throw new Error("customElements is not supported.");
|
975
|
+
}
|
976
|
+
|
977
|
+
if (customElements.get(element.getTag()) !== undefined) {
|
978
|
+
return;
|
979
|
+
}
|
980
|
+
|
981
|
+
customElements.define(element.getTag(), element);
|
973
982
|
}
|
package/source/types/version.mjs
CHANGED
package/test/cases/monster.mjs
CHANGED