@expressen/tallahassee
Advanced tools
Comparing version 11.19.0 to 11.20.0
Changelog | ||
========= | ||
## 11.20.0 | ||
- Add `insertAdjacentElement` method on `Element` | ||
## 11.19.0 | ||
@@ -5,0 +9,0 @@ |
@@ -316,2 +316,25 @@ "use strict"; | ||
} | ||
insertAdjacentElement(position, element) { | ||
switch (position) { | ||
case "beforebegin": | ||
this.$elm.before(element.$elm); | ||
if (this.parentElement) this.parentElement._emitter.emit("_insert"); | ||
break; | ||
case "afterbegin": | ||
this.$elm.prepend(element.$elm); | ||
this._emitter.emit("_insert"); | ||
break; | ||
case "beforeend": | ||
this.$elm.append(element.$elm); | ||
this._emitter.emit("_insert"); | ||
break; | ||
case "afterend": | ||
this.$elm.after(element.$elm); | ||
if (this.parentElement) this.parentElement._emitter.emit("_insert"); | ||
break; | ||
default: | ||
throw new DOMException(`Failed to execute 'insertAdjacentElement' on 'Element': The value provided (${position}) is not one of 'beforeBegin', 'afterBegin', 'beforeEnd', or 'afterEnd'.`); | ||
} | ||
return element; | ||
} | ||
insertBefore(newNode, referenceNode) { | ||
@@ -318,0 +341,0 @@ if (referenceNode === null) { |
{ | ||
"name": "@expressen/tallahassee", | ||
"version": "11.19.0", | ||
"version": "11.20.0", | ||
"description": "Lightweight client testing framework", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
112756
3123