@riotjs/dom-bindings
Advanced tools
Comparing version 6.0.6 to 6.0.7
@@ -76,3 +76,3 @@ import { insertBefore, removeChild, replaceChild, cleanNode, moveChildren, clearChildren } from '@riotjs/util/dom'; | ||
*/ | ||
var udomdiff = (a, b, get, before) => { | ||
const udomdiff = (a, b, get, before) => { | ||
const bLength = b.length; | ||
@@ -679,3 +679,3 @@ let aEnd = a.length; | ||
var expressions = { | ||
const expressions = { | ||
[ATTRIBUTE]: attributeExpression, | ||
@@ -985,3 +985,3 @@ [EVENT]: eventExpression, | ||
var bindings = { | ||
const bindings = { | ||
[IF]: create$5, | ||
@@ -1243,3 +1243,3 @@ [SIMPLE]: create$3, | ||
case !mustRemoveRoot: | ||
el.innerHTML = ''; | ||
cleanNode(el); | ||
break | ||
@@ -1246,0 +1246,0 @@ |
@@ -31,6 +31,3 @@ (function (global, factory) { | ||
function moveChildren(source, target) { | ||
if (source.firstChild) { | ||
target.appendChild(source.firstChild); | ||
moveChildren(source, target); | ||
} | ||
target.replaceChildren(...source.childNodes); | ||
} | ||
@@ -44,3 +41,4 @@ | ||
function cleanNode(node) { | ||
clearChildren(node.childNodes); | ||
// eslint-disable-next-line fp/no-loops | ||
while (node.firstChild) node.removeChild(node.firstChild); | ||
} | ||
@@ -54,3 +52,4 @@ | ||
function clearChildren(children) { | ||
Array.from(children).forEach(removeChild); | ||
// eslint-disable-next-line fp/no-loops,fp/no-let | ||
for (let i = 0;i < children.length; i++) removeChild(children[i]); | ||
} | ||
@@ -93,3 +92,3 @@ | ||
var bindingTypes = { | ||
const bindingTypes = { | ||
EACH, | ||
@@ -107,3 +106,3 @@ IF, | ||
var expressionTypes = { | ||
const expressionTypes = { | ||
ATTRIBUTE, | ||
@@ -268,3 +267,3 @@ EVENT, | ||
*/ | ||
var udomdiff = (a, b, get, before) => { | ||
const udomdiff = (a, b, get, before) => { | ||
const bLength = b.length; | ||
@@ -923,3 +922,3 @@ let aEnd = a.length; | ||
var expressions = { | ||
const expressions = { | ||
[ATTRIBUTE]: attributeExpression, | ||
@@ -1229,3 +1228,3 @@ [EVENT]: eventExpression, | ||
var bindings = { | ||
const bindings = { | ||
[IF]: create$5, | ||
@@ -1487,3 +1486,3 @@ [SIMPLE]: create$3, | ||
case !mustRemoveRoot: | ||
el.innerHTML = ''; | ||
cleanNode(el); | ||
break | ||
@@ -1490,0 +1489,0 @@ |
{ | ||
"name": "@riotjs/dom-bindings", | ||
"version": "6.0.6", | ||
"version": "6.0.7", | ||
"description": "Riot.js DOM bindings", | ||
@@ -51,3 +51,3 @@ "main": "dist/umd.dom-bindings.js", | ||
"coveralls": "^3.1.1", | ||
"eslint": "^8.22.0", | ||
"eslint": "^8.23.0", | ||
"eslint-config-riot": "^3.0.0", | ||
@@ -59,10 +59,10 @@ "esm": "^3.2.25", | ||
"nyc": "^15.1.0", | ||
"rollup": "^2.78.1", | ||
"rollup": "^2.79.0", | ||
"sinon": "^14.0.0", | ||
"sinon-chai": "^3.7.0", | ||
"typescript": "^4.7.4" | ||
"typescript": "^4.8.2" | ||
}, | ||
"dependencies": { | ||
"@riotjs/util": "^2.1.1" | ||
"@riotjs/util": "^2.1.2" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
import {clearChildren, removeChild} from '@riotjs/util/dom' | ||
import {cleanNode, clearChildren, removeChild} from '@riotjs/util/dom' | ||
import {IS_PURE_SYMBOL} from '@riotjs/util/constants' | ||
@@ -162,3 +162,3 @@ import createBinding from './binding' | ||
case !mustRemoveRoot: | ||
el.innerHTML = '' | ||
cleanNode(el) | ||
break | ||
@@ -165,0 +165,0 @@ |
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
151006
3816
Updated@riotjs/util@^2.1.2