@expressen/tallahassee
Advanced tools
Comparing version 16.0.2 to 16.0.3
@@ -9,3 +9,2 @@ "use strict"; | ||
const dollarSymbol = Symbol.for("$"); | ||
const bodySymbol = Symbol.for("$body"); | ||
const loadedSymbol = Symbol.for("loaded"); | ||
@@ -49,5 +48,2 @@ | ||
} | ||
clone(deep) { | ||
return new DocumentFragment(this.ownerDocument, deep && { $elm: this[bodySymbol] }); | ||
} | ||
querySelector(selector) { | ||
@@ -54,0 +50,0 @@ return this.ownerDocument._getElement(this.$elm.find(selector).eq(0)) || null; |
@@ -368,11 +368,22 @@ "use strict"; | ||
} | ||
replaceChildren(newChildren) { | ||
replaceChildren() { | ||
this.$elm.contents().remove(); | ||
if (newChildren !== undefined) { | ||
this.appendChild(newChildren); | ||
} else { | ||
for (const child of arguments) { | ||
this.appendChild(child); | ||
} | ||
if (arguments.length === 0) { | ||
this._emitter.emit("_insert"); | ||
} | ||
} | ||
replaceWith() { | ||
const params = []; | ||
for (const newElement of arguments) { | ||
if (newElement && newElement.$elm) { | ||
params.push(newElement.$elm); | ||
} else { | ||
params.push(String(newElement)); | ||
} | ||
} | ||
this.$elm.replaceWith(params); | ||
} | ||
removeAttribute(name) { | ||
@@ -379,0 +390,0 @@ if (!this.hasAttribute(name)) return; |
{ | ||
"name": "@expressen/tallahassee", | ||
"version": "16.0.2", | ||
"version": "16.0.3", | ||
"description": "Lightweight client testing framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
132670
4050