@web/parse5-utils
Advanced tools
Comparing version 2.0.0 to 2.0.1
{ | ||
"name": "@web/parse5-utils", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -218,3 +218,15 @@ /** @typedef {import('parse5').TreeAdapter} TreeAdapter */ | ||
} | ||
const children = adapter.getChildNodes(/** @type {ParentNode} */ (node)); | ||
/** @type {Node[]} */ | ||
let children = []; | ||
if (adapter.isElementNode(node) && adapter.getTagName(node) === 'template') { | ||
const content = adapter.getTemplateContent(node); | ||
if (content) { | ||
children = adapter.getChildNodes(content); | ||
} | ||
} else { | ||
children = adapter.getChildNodes(/** @type {ParentNode} */ (node)); | ||
} | ||
if (Array.isArray(children)) { | ||
@@ -221,0 +233,0 @@ n.unshift(...children); |
Sorry, the diff of this file is not supported yet
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
24206
576