* @see https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent * @param text new text replacing all childNodes content.
(text: string)
| 264 | * @param text new text replacing all childNodes content. |
| 265 | */ |
| 266 | set textContent(text: string) { |
| 267 | // TODO(KB): Investigate removing all children in a single .splice to childNodes. |
| 268 | this.childNodes.slice().forEach((child: Node) => child.remove()); |
| 269 | this.appendChild(this.ownerDocument.createTextNode(text)); |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * Getter returning the text representation of Element.childNodes. |
nothing calls this directly
no test coverage detected