public class DocumentFragment extends Node
DocumentFragment
.org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
NOT_FOUND
Constructor and Description |
---|
DocumentFragment() |
Modifier and Type | Method and Description |
---|---|
static void |
append(org.htmlunit.corejs.javascript.Context context,
org.htmlunit.corejs.javascript.Scriptable scope,
org.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
org.htmlunit.corejs.javascript.Function function)
Inserts a set of Node objects or string objects after the last child
of the document fragment.
|
int |
getChildElementCount()
Returns the current number of child elements.
|
HTMLCollection |
getChildren()
Gets the children of the current node.
|
Object |
getDefaultValue(Class<?> hint)
Returns the JavaScript default value of this object.
|
HtmlUnitScriptable |
getElementById(Object id)
Returns the element with the specified ID, or
null if that element could not be found. |
Element |
getFirstElementChild()
Returns the first element child.
|
Element |
getLastElementChild()
Returns the last element child.
|
Object |
getRootNode()
Returns the owner document.
|
void |
jsConstructor()
JavaScript constructor.
|
static void |
prepend(org.htmlunit.corejs.javascript.Context context,
org.htmlunit.corejs.javascript.Scriptable scope,
org.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
org.htmlunit.corejs.javascript.Function function)
Inserts a set of Node objects or string objects before the first child
of the document fragment.
|
Node |
querySelector(String selectors)
Returns the first element within the document that matches the specified group of selectors.
|
NodeList |
querySelectorAll(String selectors)
Retrieves all element nodes from descendants of the starting element node that match any selector
within the supplied selector strings.
|
static void |
replaceChildren(org.htmlunit.corejs.javascript.Context context,
org.htmlunit.corejs.javascript.Scriptable scope,
org.htmlunit.corejs.javascript.Scriptable thisObj,
Object[] args,
org.htmlunit.corejs.javascript.Function function)
Replaces the existing children of a DocumentFragment with a specified
new set of children.
|
after, append, appendChild, before, cloneNode, compareDocumentPosition, contains, getAttributes, getBaseURI, getChildNodes, getFirstChild, getJavaScriptNode, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, getTextContent, hasAttributes, hasChildNodes, insertBefore, insertBeforeImpl, isEqualNode, isSameNode, lookupPrefix, normalize, prepend, remove, removeChild, replaceChild, replaceChildren, replaceWith, setNodeValue, setTextContent
addEventListener, clearEventListenersContainer, dispatchEvent, executeEventLocally, fireEvent, getEventHandler, getEventListenersContainer, hasEventHandlers, isEventHandlerOnWindow, removeEventListener, setEventHandler
clone, equivalentValues, get, getBrowserVersion, getClassName, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getWindow, getWindow, getWindowFromTopCallScope, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromise
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
public void jsConstructor()
jsConstructor
in class Node
public static void append(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
context
- the contextscope
- the scopethisObj
- this objectargs
- the argumentsfunction
- the functionpublic static void prepend(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
context
- the contextscope
- the scopethisObj
- this objectargs
- the argumentsfunction
- the functionpublic static void replaceChildren(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
context
- the contextscope
- the scopethisObj
- this objectargs
- the argumentsfunction
- the functionpublic NodeList querySelectorAll(String selectors)
selectors
- the selectorspublic Node querySelector(String selectors)
selectors
- the selectorspublic Object getDefaultValue(Class<?> hint)
getDefaultValue
in interface org.htmlunit.corejs.javascript.Scriptable
getDefaultValue
in class HtmlUnitScriptable
hint
- a hint as to the format of the default value (ignored in this case)public int getChildElementCount()
getChildElementCount
in class Node
public Element getFirstElementChild()
getFirstElementChild
in class Node
public Element getLastElementChild()
getLastElementChild
in class Node
public HTMLCollection getChildren()
getChildren
in class Node
public HtmlUnitScriptable getElementById(Object id)
null
if that element could not be found.id
- the ID to search fornull
if it could not be foundpublic Object getRootNode()
getRootNode
in class Node
Copyright © 2002–2024 Gargoyle Software Inc.. All rights reserved.