Text interface represents a text
node in a DOM tree.
To understand what a text node is, consider the following document:
<html lang="en" class="e"> <head> <title>Aliens?</title> </head> <body> Why yes. </body> </html>
In that document, there are three text nodes, with the following contents:
Aliens?" (the contents of the
\n" (after the
</head>end tag, a newline followed by a space)
Why yes.\n" (the contents of the
Each of those text nodes is an object that has the properties and methods documented in this article.
Returns a new
Textnode with the parameter as its textual content.
|DOM Standard |
BCD tables only load in the browser