happy-dom
Advanced tools
Comparing version 0.11.1 to 0.12.0
@@ -121,2 +121,6 @@ import NodeType from './NodeType'; | ||
/** | ||
* Removes the node from its parent. | ||
*/ | ||
remove(): void; | ||
/** | ||
* Remove Child element from childNodes array. | ||
@@ -123,0 +127,0 @@ * |
@@ -347,2 +347,10 @@ "use strict"; | ||
/** | ||
* Removes the node from its parent. | ||
*/ | ||
Node.prototype.remove = function () { | ||
if (this.parentNode) { | ||
this.parentNode.removeChild(this); | ||
} | ||
}; | ||
/** | ||
* Remove Child element from childNodes array. | ||
@@ -349,0 +357,0 @@ * |
{ | ||
"name": "happy-dom", | ||
"version": "0.11.1", | ||
"version": "0.12.0", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/capricorn86/happy-dom#readme", |
@@ -221,2 +221,3 @@ # Happy DOM | ||
| ------- | ---------- | ---------------- | | ||
| 0.12.0 | 2020-01-30 | Adds support for node.remove(). (#23) | | ||
| 0.11.1 | 2020-01-30 | Adds check for space characters to the element.classList.add() function. (#32) | | ||
@@ -223,0 +224,0 @@ | 0.11.0 | 2020-01-30 | Adds support for firstElementChild and lastElementChild. (#32) | |
@@ -320,2 +320,11 @@ import NodeType from './NodeType'; | ||
/** | ||
* Removes the node from its parent. | ||
*/ | ||
public remove(): void { | ||
if (this.parentNode) { | ||
this.parentNode.removeChild(this); | ||
} | ||
} | ||
/** | ||
* Remove Child element from childNodes array. | ||
@@ -322,0 +331,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
664062
16411
276