Skip to content

Commit 8e625b9

Browse files
committed
support document fragments
1 parent 437d70f commit 8e625b9

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"description": "Base Custom Webcomponent",
33
"name": "@node-projects/base-custom-webcomponent",
4-
"version": "0.25.10",
4+
"version": "0.26.0",
55
"type": "module",
66
"main": "./dist/index.js",
77
"author": "",

src/BaseCustomWebComponent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ export class BaseCustomWebComponentNoAttachedTemplate extends HTMLElement {
462462
if (firstRun || node[property] !== value) {
463463
if (removeAttributes && attribute)
464464
(<Element>node).removeAttribute(attribute.name);
465-
if (property === 'innerHTML' && value instanceof Element) {
465+
if (property === 'innerHTML' && (value instanceof Element || value instanceof DocumentFragment)) {
466466
for (let c = node.firstChild; c !== null; c = node.firstChild) {
467467
node.removeChild(c);
468468
}

0 commit comments

Comments
 (0)