Skip to content

Commit 04abc9f

Browse files
authored
Add info about calling remove() on nodes that have no parent node (#40274)
Add info about calling remove() on nodes that have no parent node
1 parent 99487ce commit 04abc9f

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

files/en-us/web/api/characterdata/remove/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ browser-compat: api.CharacterData.remove
88

99
{{APIRef("DOM")}}
1010

11-
The **`remove()`** method of the {{domxref("CharacterData")}} removes the text contained in the node.
11+
The **`remove()`** method of the {{domxref("CharacterData")}} removes it from its parent node.
12+
If it has no parent node, calling `remove()` does nothing.
1213

1314
## Syntax
1415

files/en-us/web/api/documenttype/remove/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ browser-compat: api.DocumentType.remove
99
{{APIRef("DOM")}}
1010

1111
The **`DocumentType.remove()`** method removes a document's `doctype`.
12+
If it is already detached from the document, calling `remove()` does nothing.
1213

1314
## Syntax
1415

files/en-us/web/api/element/remove/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ browser-compat: api.Element.remove
88

99
{{APIRef("DOM")}}
1010

11-
The **`Element.remove()`** method removes the element from the DOM.
11+
The **`Element.remove()`** method removes the element from its parent node.
12+
If it has no parent node, calling `remove()` does nothing.
1213

1314
## Syntax
1415

0 commit comments

Comments
 (0)