Commit 273ad6c
fix: Node.replaceWith does not throw w/o parent (#1969)
* fix: Node.replaceWith does not throw w/o parent
```js
let div = document.createElement("div");
let span = document.createElement("span");
div.parentNode; // null
span.parentNode; // null
div.replaceWith(span); // ok
```
* chore: remove unused DOMException import
* chore: [#0] Adds unit test
---------
Co-authored-by: David Ortner <david@ortner.se>1 parent 7c44f48 commit 273ad6c
2 files changed
Lines changed: 5 additions & 2 deletions
Lines changed: 1 addition & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1203 | 1203 | | |
1204 | 1204 | | |
1205 | 1205 | | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
1206 | 1210 | | |
1207 | 1211 | | |
1208 | 1212 | | |
| |||
0 commit comments