MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / append

Method append

src/main/java/org/htmlunit/javascript/host/dom/Node.java:1060–1072  ·  view source on GitHub ↗

Inserts a set of Node objects or string objects after the last child of the Element. String objects are inserted as equivalent Text nodes. @param context the context @param thisObj this object @param args the arguments @param function the function

(final Context context, final Scriptable thisObj, final Object[] args,
            final Function function)

Source from the content-addressed store, hash-verified

1058 * @param function the function
1059 */
1060 protected static void append(final Context context, final Scriptable thisObj, final Object[] args,
1061 final Function function) {
1062 if (!(thisObj instanceof Node thisNode)) {
1063 throw JavaScriptEngine.typeError("Illegal invocation");
1064 }
1065
1066 final DomNode thisDomNode = thisNode.getDomNodeOrDie();
1067
1068 for (final Object arg : args) {
1069 final Node node = toNodeOrTextNode(thisNode, arg);
1070 thisDomNode.appendChild(node.getDomNodeOrDie());
1071 }
1072 }
1073
1074 /**
1075 * Inserts a set of Node objects or string objects before the first child of the Element.

Callers 15

appendMethod · 0.95
appendMethod · 0.95
HeadersFunction · 0.45
parseHeadersFunction · 0.45
printMethod · 0.45
toStringMethod · 0.45
makeHttpMethodMethod · 0.45
toStringMethod · 0.45
onEnterMethod · 0.45
warnMethod · 0.45
setSearchMethod · 0.45

Implementers 1

DomNodesrc/main/java/org/htmlunit/html/DomNod

Calls 4

typeErrorMethod · 0.95
toNodeOrTextNodeMethod · 0.95
appendChildMethod · 0.95
getDomNodeOrDieMethod · 0.45

Tested by

no test coverage detected