Baseline Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since October 2017.
The Text()
constructor returns a new Text
object with the optional string given in parameter as its textual content.
js
new Text()
new Text(string)
Parameters
string
Optional
A string representing the textual content of the text node.
A new Text
object with the content of the string
parameter, or the empty string if no parameter was given.
js
let text = new Text("Test");
Specifications Specification DOM RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4