@lrnwebcomponents/utils
Advanced tools
Comparing version 7.0.15 to 7.0.16
{ | ||
"name": "@lrnwebcomponents/utils", | ||
"version": "7.0.15", | ||
"version": "7.0.16", | ||
"description": "Helper functions to clean up web component data handling.", | ||
@@ -20,3 +20,3 @@ "repository": { | ||
}, | ||
"gitHead": "c7826d219bb3282c7d1f7c2cfd9fceb7e238298d" | ||
"gitHead": "3f01a081c0e9953e959deffdbcba9a7dca1eeb65" | ||
} |
13
utils.js
@@ -284,2 +284,3 @@ /** | ||
* Convert a haxElement to a DOM node. | ||
* @return {Node} DOM node. | ||
*/ | ||
@@ -752,6 +753,14 @@ function haxElementToNode(haxSchema) { | ||
let tag = node.tagName.toLowerCase(); | ||
if (window.HaxStore.instance._isSandboxed && tag === "iframe") { | ||
if (window.HaxStore && window.HaxStore.instance && window.HaxStore.instance._isSandboxed && tag === "iframe") { | ||
tag = "webview"; | ||
} | ||
let slotContent = await window.HaxStore.instance.getHAXSlot(node); | ||
let slotContent = ''; | ||
// if hax store around, allow it to get slot content of the node | ||
if (window.HaxStore && window.HaxStore.instance) { | ||
slotContent = await window.HaxStore.instance.getHAXSlot(node); | ||
} | ||
else { | ||
// if HAX isn't around, just return the innerHTML as a string for asignment to content | ||
slotContent = node.innerHTML; | ||
} | ||
// support fallback on inner text if there were no nodes | ||
@@ -758,0 +767,0 @@ if (slotContent == "") { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
79104
2431