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

Method prepend

src/main/java/org/htmlunit/javascript/host/Element.java:1747–1755  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

1745 * @param function the function
1746 */
1747 @JsxFunction
1748 public static void prepend(final Context context, final VarScope scope,
1749 final Scriptable thisObj, final Object[] args, final Function function) {
1750 if (!(thisObj instanceof Element)) {
1751 throw JavaScriptEngine.typeError("Illegal invocation");
1752 }
1753
1754 Node.prepend(context, thisObj, args, function);
1755 }
1756
1757 /**
1758 * Replaces the existing children of a Node with a specified new set of children.

Callers

nothing calls this directly

Implementers 1

DomElementsrc/main/java/org/htmlunit/html/DomEle

Calls 2

typeErrorMethod · 0.95
prependMethod · 0.95

Tested by

no test coverage detected