skatejs-named-slots
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -46,3 +46,3 @@ { | ||
}, | ||
"version": "0.2.1" | ||
"version": "0.2.2" | ||
} |
@@ -444,2 +444,14 @@ import { eachChildNode, eachNodeOrFragmentNodes } from './util/each'; | ||
function syncSlotChildNodes(firstChild) { | ||
if (canPatchNativeAccessors && getNodeType(firstChild) === 'slot' && (firstChild.__childNodes.length !== firstChild.childNodes.length)) { | ||
while (firstChild.hasChildNodes()) { | ||
firstChild.removeChild(firstChild.firstChild); | ||
} | ||
for (let i = 0; i < firstChild.__childNodes.length; i++) { | ||
firstChild.appendChild(firstChild.__childNodes[i]); | ||
} | ||
} | ||
} | ||
const members = { | ||
@@ -646,12 +658,4 @@ // For testing purposes. | ||
// to fix it we have to manually remove and insert them | ||
if (canPatchNativeAccessors && getNodeType(firstChild) == 'slot' && (firstChild.__childNodes.length != firstChild.childNodes.length)) { | ||
while (firstChild.hasChildNodes()) { | ||
firstChild.removeChild(firstChild.firstChild); | ||
} | ||
syncSlotChildNodes(firstChild); | ||
for (let i=0; i<firstChild.__childNodes.length; i++) { | ||
firstChild.appendChild(firstChild.__childNodes[i]); | ||
} | ||
} | ||
// When we polyfill everything on HTMLElement.prototype, we overwrite | ||
@@ -658,0 +662,0 @@ // properties. This makes it so that parentNode reports null even though |
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
107203
2382