@cocreate/element-prototype
Advanced tools
Comparing version 1.23.0 to 1.24.0
@@ -0,1 +1,14 @@ | ||
# [1.24.0](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.23.0...v1.24.0) (2024-06-12) | ||
### Bug Fixes | ||
* bump cocreate dependencies ([96ec548](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/96ec548571909ded9e59fdba8be52164538a6696)) | ||
* svg icon class ([549313d](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/549313d1b874189bb7a32660059943fce4177cdf)) | ||
### Features | ||
* improved handling of valueType outerHtml ([de39d50](https://github.com/CoCreate-app/CoCreate-element-prototype/commit/de39d502e2fcd1f910826433109c466184cc5b83)) | ||
# [1.23.0](https://github.com/CoCreate-app/CoCreate-element-prototype/compare/v1.22.3...v1.23.0) (2024-05-08) | ||
@@ -2,0 +15,0 @@ |
{ | ||
"name": "@cocreate/element-prototype", | ||
"version": "1.23.0", | ||
"version": "1.24.0", | ||
"description": "A simple element-prototype component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -119,6 +119,9 @@ import { storage } from './getValue'; | ||
if (parentNode) { | ||
if (newElement.children[0]) { | ||
parentNode.replaceChild(newElement.children[0], el); | ||
} | ||
else { | ||
if (newElement.children.length > 0) { | ||
let fragment = document.createDocumentFragment(); | ||
while (newElement.firstChild) { | ||
fragment.appendChild(newElement.firstChild); | ||
} | ||
parentNode.replaceChild(fragment, el); | ||
} else { | ||
parentNode.replaceChild(newElement, el); | ||
@@ -125,0 +128,0 @@ } |
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
134744
622