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)
| 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. |
no test coverage detected