MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / setText

Method setText

src/main/java/org/htmlunit/html/HtmlTitle.java:100–109  ·  view source on GitHub ↗

Sets the text attribute. @param text the text attribute

(final String text)

Source from the content-addressed store, hash-verified

98 * @param text the {@code text} attribute
99 */
100 public void setText(final String text) {
101 DomNode firstChild = getFirstChild();
102 if (firstChild == null) {
103 firstChild = new DomText(getPage(), text);
104 appendChild(firstChild);
105 }
106 else {
107 firstChild.setNodeValue(text);
108 }
109 }
110}

Callers 1

setTextMethod · 0.95

Calls 4

getPageMethod · 0.65
getFirstChildMethod · 0.45
appendChildMethod · 0.45
setNodeValueMethod · 0.45

Tested by

no test coverage detected