Class DTMNodeProxy
- All Implemented Interfaces:
EventTarget
,Attr
,CharacterData
,Comment
,Document
,DocumentFragment
,Element
,InnerHTML
,Node
,NonDocumentTypeChildNode
,NonElementParentNode
,ParentNode
,ProcessingInstruction
,DocumentRange
,Text
,DocumentTraversal
DTMNodeProxy
presents a DOM Node API front-end to the DTM model.
It does _not_ attempt to address the "node identity" question; no effort is made to prevent the creation of multiple proxies referring to a single DTM node. Users can create a mechanism for managing this, or relinquish the use of "==" and use the .sameNodeAs() mechanism, which is under consideration for future versions of the DOM.
DTMNodeProxy may be subclassed further to present specific DOM node types.
- See Also:
-
Field Summary
Fields inherited from interface org.loboevolution.html.node.Document
HTML_NAMESPACE_URI, NAMESPACE_SVG, XML_NAMESPACE_URI, XMLNS_NAMESPACE_URI
Fields inherited from interface org.loboevolution.html.node.Node
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, NONE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
Constructor Summary
ConstructorDescriptionDTMNodeProxy
(DTM dtm, int node) Create a DTMNodeProxy Node representing a specific Node in a DTM -
Method Summary
Modifier and TypeMethodDescriptionvoid
addEventListener
(String type, Function listener) addEventListener.void
addEventListener
(String type, Function listener, boolean useCapture) addEventListener.Moves node from another document and returns it.final Node
appendChild
(Node newChild) appendChild.final void
appendData
(String arg) appendData.caretRangeFromPoint
(double x, double y) caretRangeFromPoint.void
clear()
clear.cloneNode.final Node
cloneNode
(boolean deep) Returns a copy of node.void
close()
Closes an output stream and forces the sent data to display.<E extends Element>
EReturns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise.short
compareDocumentPosition
(Node other) compareDocumentPosition.boolean
Returns true if other is an inclusive descendant of node, and false otherwise.final Attr
createAttribute
(String name) Creates an attribute object with a specified name.final Attr
createAttributeNS
(String namespaceURI, String qualifiedName) createAttributeNS.final CDATASection
createCDATASection
(String data) Returns a CDATASection node whose data is data.final Comment
createComment
(String data) Creates a comment object with the specified data.final DocumentFragment
Creates a new document.final Element
createElement
(String tagName) Creates an instance of the element for the specified tag.final Element
createElementNS
(String namespaceURI, String qualifiedName) createElementNS.createElementNS
(String namespace, String qualifiedName, String options) Returns an element with namespace.final EntityReference
createEntityReference
(String name) createEvent
(String eventInterface) createEvent.createExpression.createNodeIterator
(Node root) Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.createNodeIterator
(Node root, int whatToShow) Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.createNodeIterator
(Node root, int whatToShow, NodeFilter filter) Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.createNodeIterator
(Node root, NodeFilter filter) Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.createNSResolver
(Node nodeResolver) createNSResolver.final ProcessingInstruction
createProcessingInstruction
(String target, String data) Returns a ProcessingInstruction node whose target is target and data is data.Returns an empty range object that has both of its boundary points positioned at the beginning of the document.final Text
createTextNode
(String data) Creates a text string from the specified value.createTreeWalker
(Node root) createTreeWalker.createTreeWalker
(Node root, int whatToShow) createTreeWalker.createTreeWalker
(Node root, int whatToShow, NodeFilter filter) createTreeWalker.createTreeWalker
(Node root, NodeFilter filter) createTreeWalker.final void
deleteData
(int offset, int count) deleteData.boolean
dispatchEvent
(Event evt) dispatchEvent.boolean
dispatchEvent
(Node element, Event evt) dispatchEvent.elementFromPoint
(double x, double y) Returns the element for the specified x coordinate and the specified y coordinate.final boolean
final boolean
Test for equality based on node number.evaluate
(String expression, Node contextNode, XPathNSResolver resolver, short type, Object result) evaluate.boolean
execCommand
(String commandId) execCommand.boolean
execCommand
(String commandId, boolean showUI) execCommand.boolean
execCommand
(String commandId, boolean showUI, String value) Executes a command on the current document, current selection, or the given range.Gets the object that has the focus when the parent document has focus.getall()
Returns a reference to the collection of elements contained by the object.Retrieves a collection of all a objects that have a name and/or id property.Retrieves a collection of all applet objects in the document.getAssignedSlot.final String
getAttribute
(String name) Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.String[]
Returns the qualified names of all element's attributes.final Attr
getAttributeNode
(String name) getAttributeNode.final Attr
getAttributeNodeNS
(String namespaceURI, String localName) getAttributeNodeNS.final String
getAttributeNS
(String namespaceURI, String localName) Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.final NamedNodeMap
getAttributes.Returns node's node document's document base URL.Deprecated.getBody()
Specifies the beginning and end of the document body.getBoundingClientRect.Returns document's encoding.Gets or sets the character set used to encode the object.int
getChildElementCount.final NodeList
Returns the children.Returns the child elements.Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.Returns the value of element's class content attribute.int
getClientHeight.int
getClientLeft.getClientRects.int
getClientTop.getClientWidth.getCommands.Gets a value that indicates whether standards-compliant mode is switched on for the object.Returns document's content type.Returns the HTTP cookies that apply to the Document.Returns the script element, or the SVG script element, that is currently executing, as long as the element represents a classic script.final String
getData()
getData.getDefaultView.Sets or gets a value that indicates whether the document can be edited.getDir()
Sets or retrieves a value that indicates the reading order of the object.final DocumentType
Gets an object representing the document type declaration associated with the current document.final Element
Gets a reference to the root node of the document.Returns document's URL.Sets or gets the security domain of the document.getDomConfig.final int
NON-DOM: Return the DTM node numberfinal Element
getElementById
(String elementId) Returns the first element within node's descendants whose ID is elementId.getElementsByClassName
(String classNames) Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames.getElementsByName
(String elementName) Gets a collection of objects based on the value of the NAME or ID attribute.final HTMLCollection
getElementsByTagName
(String tagname) Retrieves a collection of objects based on the specified element name.final HTMLCollection
getElementsByTagNameNS
(String namespaceURI, String localName) If namespace and localName are "*" returns a HTMLCollection of all descendant elements.Retrieves a collection of all embed objects in the document.getFeature
(String name, String version) Sets or gets the foreground (text) color of the document.final Node
Returns the first child.Returns the first child that is an element, and null otherwise.getForms()
Retrieves a collection, in source order, of all form objects in the document.getHead()
Returns the head element.getId()
Returns the value of element's id content attribute.Retrieves a collection, in source order, of img objects in the document.final DOMImplementation
Gets the implementation object of the current document.getInnerHTML.getInnerText.Returns the character encoding used to create the webpage that is loaded into the document object.final Node
Returns the last child.Returns the last child that is an element, and null otherwise.Gets the date that the page was last modified, if the page supplies one.final int
getLength.getLinks()
Retrieves a collection of all a objects that specify the href property and all area objects in the document.final String
getLocalName.Contains information about the current URL.final String
getName()
getName.final String
getNamespaceURI.Returns the first following sibling that is an element, and null otherwise.final Node
Returns the next sibling.final String
Returns a string appropriate for the type of node.final int
Returns the type of node.final String
getNodeValue.Returns document's origin.getOuterHTML.final Document
Returns the node document.final Node
getOwnerElement.Returns the parent element.final Node
Returns the parent.Return an HTMLCollection of the embed elements in the Document.final String
Returns prefix.Returns the first preceding sibling that is an element, and null otherwise.final Node
Returns the previous sibling.Retrieves a value that indicates the current state of the object.Gets the URL of the location that referred the user to the current page.Returns node's root.getSchemaTypeInfo.Retrieves a collection of all script objects in the document.double
getScrollHeight.getScrollingElement.double
getScrollLeft.double
getScrollTop.double
getScrollWidth.Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.getSlot()
Returns the value of element's slot content attribute.boolean
getStrictErrorChecking.final String
Returns the HTML-uppercased qualified name.final String
getTarget.getTextContent.getTitle()
Contains the title of the document.getURL()
Sets or gets the URL for the current document.getUserData
(String key) getUserData.final String
getValue()
getValue.getVisibilityState.Returns the combined data of all direct Text node siblings.getXmlEncoding.boolean
getXmlStandalone.getXmlVersion.boolean
hasAttribute
(String name) Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.boolean
hasAttributeNS
(String namespaceURI, String localName) Returns true if element has an attribute whose namespace is namespace and local name is localName.boolean
Returns true if element has attributes, and false otherwise.final boolean
Returns whether node has children.boolean
hasFocus()
Gets a value indicating whether the object currently has focus.boolean
hasPointerCapture
(int pointerId) hasPointerCapture.final Node
importNode
(Node importedNode, boolean deep) Returns a copy of node.insertAdjacentElement
(String where, Node insertedElement) insertAdjacentElement.void
insertAdjacentHTML
(String position, String text) insertAdjacentHTML.final Node
insertBefore
(Node newChild, Node refChild) insertBefore.final void
insertData
(int offset, String arg) insertData.boolean
isDefaultNamespace
(String namespaceURI) isDefaultNamespace.boolean
isElementContentWhitespace.boolean
isEqualNode
(Node arg) Returns whether node and otherNode have the same properties.boolean
isFullscreen.boolean
Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise.boolean
isHidden()
isHidden.boolean
isId()
isId.boolean
Returns true if node is connected and false otherwise.boolean
isSameNode
(Node other) isSameNode.boolean
isSpecified.final boolean
isSupported
(String feature, String version) boolean
isXml()
lookupNamespaceURI
(String specifiedPrefix) lookupNamespaceURI.lookupPrefix
(String namespaceURI) lookupPrefix.boolean
Returns true if matching selectors against element's root yields element, and false otherwise.final void
Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes.void
normalizeDocument.open()
open.open.open.open.Opens a new window and loads a document specified by a given URL.prepend.prependChild
(Node newChild) prependChild.boolean
queryCommandEnabled
(String commandId) Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.boolean
queryCommandIndeterm
(String commandId) Returns a Boolean value that indicates whether the specified command is in the indeterminate state.boolean
queryCommandState
(String commandId) Returns a Boolean value that indicates the current state of the command.boolean
queryCommandSupported
(String commandId) Returns a Boolean value that indicates whether the current command is supported on the current range.queryCommandValue
(String commandId) Returns the current value of the document, range, or current selection for the given command.querySelector
(String selectors) Returns the first element that is a descendant of node that matches selectors.querySelectorAll
(String selectors) Returns all element descendants of node that match selectors.void
releaseEvents.void
releasePointerCapture
(int pointerId) releasePointerCapture.final void
removeAttribute
(String name) Removes element's first attribute whose qualified name is qualifiedName.final Attr
removeAttributeNode
(Attr oldAttr) removeAttributeNode.final void
removeAttributeNS
(String namespaceURI, String localName) Removes element's attribute whose namespace is namespace and local name is localName.final Node
removeChild
(Node oldChild) removeChild.void
removeEventListener
(String type, Function listener) removeEventListener.void
removeEventListener
(String type, Function listener, boolean useCapture) removeEventListener.renameNode
(Node node, String namespaceURI, String qualifiedName) final Node
replaceChild
(Node newChild, Node oldChild) replaceChild.final void
replaceData
(int offset, int count, String arg) replaceData.replaceWholeText
(String content) replaceWholeText.void
requestPointerLock.void
scroll
(int x, int y) scroll.void
scrollBy
(int x, int y) scrollBy.void
scrollIntoView.void
scrollIntoView
(boolean arg) scrollIntoView.void
scrollTo
(int x, int y) scrollTo.final void
setAttribute
(String name, String value) Sets the value of element's first attribute whose qualified name is qualifiedName to value.final Attr
setAttributeNode
(Attr newAttr) setAttributeNode.final Attr
setAttributeNodeNS
(Attr newAttr) setAttributeNodeNS.final void
setAttributeNS
(String namespaceURI, String qualifiedName, String value) Sets the value of element's attribute whose namespace is namespace and local name is localName to value.void
setBgColor
(String bgColor) setBgColor.void
setBody
(HTMLElement body) setBody.void
setClassName
(String className) setClassName.void
setCookie.final void
setData.void
setDesignMode
(String designMode) setDesignMode.void
setDir.void
setDocumentURI
(String documentURI) setDocumentURI.void
setDomain.void
setFgColor
(String fgColor) setFgColor.void
setId.void
setIdAttribute
(String name, boolean makeId) setIdAttribute.void
setIdAttributeNode
(Attr at, boolean makeId) setIdAttributeNode.void
setIdAttributeNS
(String namespaceURI, String localName, boolean makeId) setIdAttributeNode.void
setInnerHTML
(String innerHTML) setInnerHTML.void
setLocation
(Location location) setLocation.final void
setNodeValue
(String nodeValue) setNodeValue.void
setOuterHTML
(String outerHTML) setOuterHTML.void
setOwnerDocument
(Document document) setOwnerDocument.void
setOwnerElement
(Node element) setOwnerElement.void
setPointerCapture
(int pointerId) setPointerCapture.final void
setPrefix.void
setScrollLeft
(double scrollLeft) setScrollLeft.void
setScrollTop
(double scrollTop) setScrollTop.void
setSlot.void
setStrictErrorChecking
(boolean strictErrorChecking) setStrictErrorChecking.void
setTextContent
(String textContent) setTextContent.void
setTitle.setUserData
(String key, Object data, UserDataHandler handler) setUserData.final void
setValue.void
setXml
(boolean xml) void
setXmlStandalone
(boolean xmlStandalone) setXmlStandalone.void
setXmlVersion
(String xmlVersion) setXmlVersion.final Text
splitText
(int offset) Splits data at the given offset and returns the remainder as Text node.final String
substringData
(int offset, int count) substringData.boolean
toggleAttribute
(String qualifiedName) toggleAttribute.boolean
toggleAttribute
(String qualifiedName, boolean force) If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present.void
Writes one or more HTML expressions to a document in the specified window.void
Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window.
-
Field Details
-
dtm
The DTM for this node. -
fDocumentURI
-
-
Constructor Details
-
DTMNodeProxy
Create a DTMNodeProxy Node representing a specific Node in a DTM- Parameters:
dtm
- The DTM Reference, must be non-null.node
- The DTM node handle.
-
-
Method Details
-
getDTMNodeNumber
public final int getDTMNodeNumber()NON-DOM: Return the DTM node number- Returns:
- The DTM node handle.
-
equals
Test for equality based on node number.- Parameters:
node
- A DTM node proxy reference.- Returns:
- true if the given node has the same handle as this node.
-
equals
-
getNodeName
Returns a string appropriate for the type of node.- Specified by:
getNodeName
in interfaceNode
- Returns:
- a
String
object.
-
getTarget
getTarget.
- Specified by:
getTarget
in interfaceProcessingInstruction
- Returns:
- a
String
object.
-
getClassList
Description copied from interface:Element
Allows for manipulation of element's class content attribute as a set of whitespace-separated tokens through a DOMTokenList object.- Specified by:
getClassList
in interfaceElement
- Returns:
- a
DOMTokenList
object.
-
getClassName
Description copied from interface:Element
Returns the value of element's class content attribute. Can be set to change it.- Specified by:
getClassName
in interfaceElement
- Returns:
- a
String
object.
-
setClassName
Description copied from interface:Element
setClassName.
- Specified by:
setClassName
in interfaceElement
- Parameters:
className
- aString
object.
-
getClientHeight
public int getClientHeight()Description copied from interface:Element
getClientHeight.
- Specified by:
getClientHeight
in interfaceElement
- Returns:
- a
Integer
object.
-
getClientLeft
public int getClientLeft()Description copied from interface:Element
getClientLeft.
- Specified by:
getClientLeft
in interfaceElement
- Returns:
- a
Integer
object.
-
getClientTop
public int getClientTop()Description copied from interface:Element
getClientTop.
- Specified by:
getClientTop
in interfaceElement
- Returns:
- a
Integer
object.
-
getClientWidth
Description copied from interface:Element
getClientWidth.
- Specified by:
getClientWidth
in interfaceElement
- Returns:
- a
Integer
object.
-
getId
Description copied from interface:Element
Returns the value of element's id content attribute. Can be set to change it. -
setId
Description copied from interface:Element
setId.
-
getLocalName
getLocalName.
- Specified by:
getLocalName
in interfaceAttr
- Specified by:
getLocalName
in interfaceElement
- Specified by:
getLocalName
in interfaceNode
- Returns:
- a
String
object.
-
getPrefix
Returns prefix. -
getScrollHeight
public double getScrollHeight()Description copied from interface:Element
getScrollHeight.
- Specified by:
getScrollHeight
in interfaceElement
- Returns:
- a double.
-
getScrollLeft
public double getScrollLeft()Description copied from interface:Element
getScrollLeft.
- Specified by:
getScrollLeft
in interfaceElement
- Returns:
- a double.
-
setScrollLeft
public void setScrollLeft(double scrollLeft) Description copied from interface:Element
setScrollLeft.
- Specified by:
setScrollLeft
in interfaceElement
- Parameters:
scrollLeft
- aInteger
object.
-
getScrollTop
public double getScrollTop()Description copied from interface:Element
getScrollTop.
- Specified by:
getScrollTop
in interfaceElement
- Returns:
- a double.
-
setScrollTop
public void setScrollTop(double scrollTop) Description copied from interface:Element
setScrollTop.
- Specified by:
setScrollTop
in interfaceElement
- Parameters:
scrollTop
- aInteger
object.
-
getScrollWidth
public double getScrollWidth()Description copied from interface:Element
getScrollWidth.
- Specified by:
getScrollWidth
in interfaceElement
- Returns:
- a double.
-
getSlot
Description copied from interface:Element
Returns the value of element's slot content attribute. Can be set to change it. -
setSlot
Description copied from interface:Element
setSlot.
-
setPrefix
setPrefix.
- Specified by:
setPrefix
in interfaceNode
- Parameters:
prefix
- aString
object.- Throws:
DOMException
-
getNamespaceURI
getNamespaceURI.
- Specified by:
getNamespaceURI
in interfaceAttr
- Specified by:
getNamespaceURI
in interfaceElement
- Specified by:
getNamespaceURI
in interfaceNode
- Returns:
- a
String
object.
-
getOuterHTML
Description copied from interface:Element
getOuterHTML.
- Specified by:
getOuterHTML
in interfaceElement
- Returns:
- a
String
object.
-
getBoundingClientRect
Description copied from interface:Element
getBoundingClientRect.
- Specified by:
getBoundingClientRect
in interfaceElement
- Returns:
- a
DOMRect
object.
-
getClientRects
Description copied from interface:Element
getClientRects.
- Specified by:
getClientRects
in interfaceElement
- Returns:
- a
DOMRectList
object.
-
isSupported
- Specified by:
isSupported
in interfaceNode
-
getNodeValue
getNodeValue.
- Specified by:
getNodeValue
in interfaceNode
- Returns:
- a
String
object. - Throws:
DOMException
-
setNodeValue
setNodeValue.
- Specified by:
setNodeValue
in interfaceNode
- Parameters:
nodeValue
- aString
object.- Throws:
DOMException
-
getNodeType
public final int getNodeType()Returns the type of node.- Specified by:
getNodeType
in interfaceNode
- Returns:
- a
Integer
object.
-
getParentNode
Returns the parent.- Specified by:
getParentNode
in interfaceNode
- Returns:
- a
Node
object.
-
getChildNodes
Returns the children.- Specified by:
getChildNodes
in interfaceNode
- Returns:
- a
NodeList
object.
-
getFirstChild
Returns the first child.- Specified by:
getFirstChild
in interfaceNode
- Returns:
- a
Node
object.
-
isIsConnected
public boolean isIsConnected()Description copied from interface:Node
Returns true if node is connected and false otherwise.- Specified by:
isIsConnected
in interfaceNode
- Returns:
- a boolean.
-
getLastChild
Returns the last child.- Specified by:
getLastChild
in interfaceNode
- Returns:
- a
Node
object.
-
getPreviousSibling
Returns the previous sibling.- Specified by:
getPreviousSibling
in interfaceNode
- Returns:
- a
Node
object.
-
getRootNode
Description copied from interface:Node
Returns node's root.- Specified by:
getRootNode
in interfaceNode
- Returns:
- a
Node
object.
-
getNextSibling
Returns the next sibling.- Specified by:
getNextSibling
in interfaceNode
- Returns:
- a
Node
object.
-
getAttributes
getAttributes.
- Specified by:
getAttributes
in interfaceNode
- Returns:
- a
NamedNodeMap
object.
-
hasAttribute
Returns true if element has an attribute whose qualified name is qualifiedName, and false otherwise.- Specified by:
hasAttribute
in interfaceElement
- Parameters:
name
- aString
object.- Returns:
- a boolean.
-
hasAttributeNS
Returns true if element has an attribute whose namespace is namespace and local name is localName.- Specified by:
hasAttributeNS
in interfaceElement
- Parameters:
namespaceURI
- aString
object.localName
- aString
object.- Returns:
- a boolean.
-
hasPointerCapture
public boolean hasPointerCapture(int pointerId) Description copied from interface:Element
hasPointerCapture.
- Specified by:
hasPointerCapture
in interfaceElement
- Parameters:
pointerId
- aInteger
object.- Returns:
- a boolean.
-
matches
Description copied from interface:Element
Returns true if matching selectors against element's root yields element, and false otherwise. -
releasePointerCapture
public void releasePointerCapture(int pointerId) Description copied from interface:Element
releasePointerCapture.
- Specified by:
releasePointerCapture
in interfaceElement
- Parameters:
pointerId
- aInteger
object.
-
getOwnerDocument
Returns the node document. Returns null for documents.- Specified by:
getOwnerDocument
in interfaceNode
- Returns:
- a
Document
object.
-
setOwnerDocument
Description copied from interface:Node
setOwnerDocument.
- Specified by:
setOwnerDocument
in interfaceNode
- Parameters:
document
- aDocument
object.
-
getParentElement
Description copied from interface:Node
Returns the parent element.- Specified by:
getParentElement
in interfaceNode
- Returns:
- a
HTMLElement
object.
-
insertBefore
insertBefore.
- Specified by:
insertBefore
in interfaceNode
- Parameters:
newChild
- aNode
object.refChild
- aNode
object.- Returns:
- a
Node
object. - Throws:
DOMException
-
replaceChild
replaceChild.
- Specified by:
replaceChild
in interfaceNode
- Parameters:
newChild
- aNode
object.oldChild
- aNode
object.- Returns:
- a
Node
object. - Throws:
DOMException
-
removeChild
removeChild.
- Specified by:
removeChild
in interfaceNode
- Parameters:
oldChild
- aNode
object.- Returns:
- a
Node
object. - Throws:
DOMException
-
appendChild
appendChild.
- Specified by:
appendChild
in interfaceNode
- Parameters:
newChild
- aNode
object.- Returns:
- a
Node
object. - Throws:
DOMException
-
prependChild
Description copied from interface:Node
prependChild.
- Specified by:
prependChild
in interfaceNode
- Parameters:
newChild
- aNode
object.- Returns:
- a
Node
object.
-
prepend
Description copied from interface:Node
prepend.
-
hasChildNodes
public final boolean hasChildNodes()Returns whether node has children.- Specified by:
hasChildNodes
in interfaceNode
- Returns:
- a boolean.
-
cloneNode
Returns a copy of node. If deep is true, the copy also includes the node's descendants. -
cloneNode
Description copied from interface:Node
cloneNode.
-
getURL
Description copied from interface:Document
Sets or gets the URL for the current document. -
getActiveElement
Description copied from interface:Document
Gets the object that has the focus when the parent document has focus.- Specified by:
getActiveElement
in interfaceDocument
- Returns:
- a
Element
object.
-
getall
Description copied from interface:Document
Returns a reference to the collection of elements contained by the object.- Specified by:
getall
in interfaceDocument
- Returns:
- a
HTMLAllCollection
object.
-
getAnchors
Description copied from interface:Document
Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.- Specified by:
getAnchors
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getApplets
Description copied from interface:Document
Retrieves a collection of all applet objects in the document.- Specified by:
getApplets
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getCommands
Description copied from interface:Document
getCommands.
- Specified by:
getCommands
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getBgColor
Description copied from interface:Document
Deprecated. Sets or retrieves a value that indicates the background color behind the object.- Specified by:
getBgColor
in interfaceDocument
- Returns:
- a
String
object.
-
setBgColor
Description copied from interface:Document
setBgColor.
- Specified by:
setBgColor
in interfaceDocument
- Parameters:
bgColor
- aString
object.
-
getBody
Description copied from interface:Document
Specifies the beginning and end of the document body.- Specified by:
getBody
in interfaceDocument
- Returns:
- a
HTMLElement
object.
-
setBody
Description copied from interface:Document
setBody.
- Specified by:
setBody
in interfaceDocument
- Parameters:
body
- aHTMLElement
object.
-
getCharacterSet
Description copied from interface:Document
Returns document's encoding.- Specified by:
getCharacterSet
in interfaceDocument
- Returns:
- a
String
object.
-
getCharset
Description copied from interface:Document
Gets or sets the character set used to encode the object.- Specified by:
getCharset
in interfaceDocument
- Returns:
- a
String
object.
-
getCompatMode
Description copied from interface:Document
Gets a value that indicates whether standards-compliant mode is switched on for the object.- Specified by:
getCompatMode
in interfaceDocument
- Returns:
- a
String
object.
-
getContentType
Description copied from interface:Document
Returns document's content type.- Specified by:
getContentType
in interfaceDocument
- Returns:
- a
String
object.
-
getCookie
Description copied from interface:Document
Returns the HTTP cookies that apply to the Document. If there are no cookies or cookies can't be applied to this resource, the empty string will be returned.Can be set, to add a new cookie to the element's set of HTTP cookies.
If the contents are sandboxed into a unique origin (e.g. in an iframe with the sandbox attribute), a "SecurityError" DOMException will be thrown on getting and setting.
-
setCookie
Description copied from interface:Document
setCookie.
-
getCurrentScript
Description copied from interface:Document
Returns the script element, or the SVG script element, that is currently executing, as long as the element represents a classic script. In the case of reentrant script execution, returns the one that most recently started executing amongst those that have not yet finished executing.Returns null if the Document is not currently executing a script or SVG script element (e.g., because the running script is an event handler, or a timeout), or if the currently executing script or SVG script element represents a module script.
- Specified by:
getCurrentScript
in interfaceDocument
- Returns:
- a
HTMLScriptElement
object.
-
getDefaultView
Description copied from interface:Document
getDefaultView.
- Specified by:
getDefaultView
in interfaceDocument
- Returns:
- a
Window
object.
-
getDesignMode
Description copied from interface:Document
Sets or gets a value that indicates whether the document can be edited.- Specified by:
getDesignMode
in interfaceDocument
- Returns:
- a
String
object.
-
setDesignMode
Description copied from interface:Document
setDesignMode.
- Specified by:
setDesignMode
in interfaceDocument
- Parameters:
designMode
- aString
object.
-
getDir
Description copied from interface:Document
Sets or retrieves a value that indicates the reading order of the object. -
setDir
Description copied from interface:Document
setDir.
-
getDoctype
Gets an object representing the document type declaration associated with the current document.- Specified by:
getDoctype
in interfaceDocument
- Returns:
- a
DocumentType
object.
-
getImplementation
Gets the implementation object of the current document.- Specified by:
getImplementation
in interfaceDocument
- Returns:
- a
DOMImplementation
object.
-
getDocumentElement
Gets a reference to the root node of the document.- Specified by:
getDocumentElement
in interfaceDocument
- Returns:
- a
Element
object.
-
createElement
Creates an instance of the element for the specified tag.- Specified by:
createElement
in interfaceDocument
- Parameters:
tagName
- The name of an element.- Returns:
- a
Element
object. - Throws:
DOMException
-
createElementNS
Description copied from interface:Document
Returns an element with namespace. Its namespace prefix will be everything before ":" (U+003E) in qualifiedName or null. Its local name will be everything after ":" (U+003E) in qualifiedName or qualifiedName.If localName does not match the Name production an "InvalidCharacterError" DOMException will be thrown.
If one of the following conditions is true a "NamespaceError" DOMException will be thrown:
localName does not match the QName production. Namespace prefix is not null and namespace is the empty string. Namespace prefix is "xml" and namespace is not the XML namespace. qualifiedName or namespace prefix is "xmlns" and namespace is not the XMLNS namespace. namespace is the XMLNS namespace and neither qualifiedName nor namespace prefix is "xmlns".
When supplied, options's is can be used to create a customized built-in element.
-
createDocumentFragment
Creates a new document.- Specified by:
createDocumentFragment
in interfaceDocument
- Returns:
- a
DocumentFragment
object.
-
createTextNode
Creates a text string from the specified value.- Specified by:
createTextNode
in interfaceDocument
- Parameters:
data
- String that specifies the nodeValue property of the text node.- Returns:
- a
Text
object.
-
elementFromPoint
Description copied from interface:Document
Returns the element for the specified x coordinate and the specified y coordinate.- Specified by:
elementFromPoint
in interfaceDocument
- Parameters:
x
- The x-offsety
- The y-offset- Returns:
- a
Element
object.
-
execCommand
Description copied from interface:Document
Executes a command on the current document, current selection, or the given range.- Specified by:
execCommand
in interfaceDocument
- Parameters:
commandId
- String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.showUI
- Display the user interface, defaults to false.value
- Value to assign.- Returns:
- a boolean.
-
execCommand
Description copied from interface:Document
execCommand.
- Specified by:
execCommand
in interfaceDocument
- Parameters:
commandId
- aString
object.showUI
- a boolean.- Returns:
- a boolean.
-
execCommand
Description copied from interface:Document
execCommand.
- Specified by:
execCommand
in interfaceDocument
- Parameters:
commandId
- aString
object.- Returns:
- a boolean.
-
createComment
Creates a comment object with the specified data.- Specified by:
createComment
in interfaceDocument
- Parameters:
data
- Sets the comment object's data.- Returns:
- a
Comment
object.
-
createCDATASection
Returns a CDATASection node whose data is data.- Specified by:
createCDATASection
in interfaceDocument
- Parameters:
data
- aString
object.- Returns:
- a
CDATASection
object. - Throws:
DOMException
-
createProcessingInstruction
public final ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException Returns a ProcessingInstruction node whose target is target and data is data. If target does not match the Name production an "InvalidCharacterError" DOMException will be thrown. If data contains "?>" an "InvalidCharacterError" DOMException will be thrown.- Specified by:
createProcessingInstruction
in interfaceDocument
- Parameters:
target
- aString
object.data
- aString
object.- Returns:
- a
ProcessingInstruction
object. - Throws:
DOMException
-
createRange
Description copied from interface:DocumentRange
Returns an empty range object that has both of its boundary points positioned at the beginning of the document.- Specified by:
createRange
in interfaceDocumentRange
- Returns:
- a
Range
object.
-
createAttribute
Creates an attribute object with a specified name.- Specified by:
createAttribute
in interfaceDocument
- Parameters:
name
- String that sets the attribute object's name.- Returns:
- a
Attr
object. - Throws:
DOMException
-
createEntityReference
- Specified by:
createEntityReference
in interfaceDocument
- Throws:
DOMException
-
renameNode
- Specified by:
renameNode
in interfaceDocument
-
isXml
public boolean isXml() -
setXml
public void setXml(boolean xml) -
getElementsByTagName
Retrieves a collection of objects based on the specified element name.- Specified by:
getElementsByTagName
in interfaceDocument
- Specified by:
getElementsByTagName
in interfaceElement
- Parameters:
tagname
- Specifies the name of an element.- Returns:
- a
HTMLCollection
object.
-
importNode
Returns a copy of node. If deep is true, the copy also includes the node's descendants.If node is a document or a shadow root, throws a "NotSupportedError" DOMException.
- Specified by:
importNode
in interfaceDocument
- Parameters:
importedNode
- aNode
object.deep
- a boolean.- Returns:
- a
Node
object. - Throws:
DOMException
-
open
Description copied from interface:Document
Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.- Specified by:
open
in interfaceDocument
- Parameters:
url
- Specifies a MIME type for the document.name
- Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element.features
- Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported.replace
- Specifies whether the existing entry for the document is replaced in the history list.- Returns:
- a
Document
object.
-
open
Description copied from interface:Document
open.
-
open
Description copied from interface:Document
open.
-
open
Description copied from interface:Document
open.
-
open
Description copied from interface:Document
open.
-
queryCommandEnabled
Description copied from interface:Document
Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document.- Specified by:
queryCommandEnabled
in interfaceDocument
- Parameters:
commandId
- Specifies a command identifier.- Returns:
- a boolean.
-
queryCommandIndeterm
Description copied from interface:Document
Returns a Boolean value that indicates whether the specified command is in the indeterminate state.- Specified by:
queryCommandIndeterm
in interfaceDocument
- Parameters:
commandId
- String that specifies a command identifier.- Returns:
- a boolean.
-
queryCommandState
Description copied from interface:Document
Returns a Boolean value that indicates the current state of the command.- Specified by:
queryCommandState
in interfaceDocument
- Parameters:
commandId
- String that specifies a command identifier.- Returns:
- a boolean.
-
queryCommandSupported
Description copied from interface:Document
Returns a Boolean value that indicates whether the current command is supported on the current range.- Specified by:
queryCommandSupported
in interfaceDocument
- Parameters:
commandId
- Specifies a command identifier.- Returns:
- a boolean.
-
queryCommandValue
Description copied from interface:Document
Returns the current value of the document, range, or current selection for the given command.- Specified by:
queryCommandValue
in interfaceDocument
- Parameters:
commandId
- String that specifies a command identifier.- Returns:
- a
String
object.
-
releaseEvents
public void releaseEvents()Description copied from interface:Document
releaseEvents.
- Specified by:
releaseEvents
in interfaceDocument
-
write
Description copied from interface:Document
Writes one or more HTML expressions to a document in the specified window. -
writeln
Description copied from interface:Document
Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. -
createElementNS
createElementNS.
- Specified by:
createElementNS
in interfaceDocument
- Parameters:
namespaceURI
- aString
object.qualifiedName
- aString
object.- Returns:
- a
Element
object. - Throws:
DOMException
-
createEvent
Description copied from interface:Document
createEvent.
- Specified by:
createEvent
in interfaceDocument
- Parameters:
eventInterface
- aString
object.- Returns:
- a
Event
object.
-
createAttributeNS
createAttributeNS.
- Specified by:
createAttributeNS
in interfaceDocument
- Parameters:
namespaceURI
- aString
object.qualifiedName
- aString
object.- Returns:
- a
Attr
object. - Throws:
DOMException
-
getElementsByTagNameNS
If namespace and localName are "*" returns a HTMLCollection of all descendant elements.If only namespace is "*" returns a HTMLCollection of all descendant elements whose local name is localName.
If only localName is "*" returns a HTMLCollection of all descendant elements whose namespace is namespace.
Otherwise, returns a HTMLCollection of all descendant elements whose namespace is namespace and local name is localName.
- Specified by:
getElementsByTagNameNS
in interfaceDocument
- Specified by:
getElementsByTagNameNS
in interfaceElement
- Parameters:
namespaceURI
- aString
object.localName
- aString
object.- Returns:
- a
HTMLCollection
object.
-
getSelection
Description copied from interface:Document
Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.- Specified by:
getSelection
in interfaceDocument
- Returns:
- a
Selection
object.
-
getElementById
Returns the first element within node's descendants whose ID is elementId. Returns a reference to the first object with the specified value of the ID or NAME attribute.- Specified by:
getElementById
in interfaceDocument
- Specified by:
getElementById
in interfaceNonElementParentNode
- Parameters:
elementId
- aString
object.- Returns:
- a
Element
object.
-
getElementsByClassName
Description copied from interface:Document
Returns a HTMLCollection of the elements in the object on which the method was invoked (a document or an element) that have all the classes given by classNames. The classNames argument is interpreted as a space-separated list of classes.- Specified by:
getElementsByClassName
in interfaceDocument
- Specified by:
getElementsByClassName
in interfaceElement
- Parameters:
classNames
- aString
object.- Returns:
- a
HTMLCollection
object.
-
getElementsByName
Description copied from interface:Document
Gets a collection of objects based on the value of the NAME or ID attribute.- Specified by:
getElementsByName
in interfaceDocument
- Parameters:
elementName
- Gets a collection of objects based on the value of the NAME or ID attribute.- Returns:
- a
HTMLCollection
object.
-
splitText
Splits data at the given offset and returns the remainder as Text node.- Specified by:
splitText
in interfaceText
- Parameters:
offset
- aInteger
object.- Returns:
- a
Text
object. - Throws:
DOMException
-
getData
getData.
- Specified by:
getData
in interfaceCharacterData
- Returns:
- a
String
object. - Throws:
DOMException
-
setData
setData.
- Specified by:
setData
in interfaceCharacterData
- Parameters:
data
- aString
object.- Throws:
DOMException
-
getLength
public final int getLength()getLength.
- Specified by:
getLength
in interfaceCharacterData
- Returns:
- a
Integer
object.
-
substringData
substringData.
- Specified by:
substringData
in interfaceCharacterData
- Parameters:
offset
- aInteger
object.count
- aInteger
object.- Returns:
- a
String
object. - Throws:
DOMException
-
appendData
appendData.
- Specified by:
appendData
in interfaceCharacterData
- Parameters:
arg
- aString
object.- Throws:
DOMException
-
insertData
insertData.
- Specified by:
insertData
in interfaceCharacterData
- Parameters:
offset
- aInteger
object.arg
- aString
object.- Throws:
DOMException
-
deleteData
deleteData.
- Specified by:
deleteData
in interfaceCharacterData
- Parameters:
offset
- aInteger
object.count
- aInteger
object.- Throws:
DOMException
-
replaceData
replaceData.
- Specified by:
replaceData
in interfaceCharacterData
- Parameters:
offset
- aInteger
object.count
- aInteger
object.arg
- aString
object.- Throws:
DOMException
-
getTagName
Returns the HTML-uppercased qualified name.- Specified by:
getTagName
in interfaceElement
- Returns:
- a
String
object.
-
closest
Description copied from interface:Element
Returns the first (starting at element) inclusive ancestor that matches selectors, and null otherwise. -
getAttribute
Returns element's first attribute whose qualified name is qualifiedName, and null if there is no such attribute otherwise.- Specified by:
getAttribute
in interfaceElement
- Parameters:
name
- aString
object.- Returns:
- a
String
object.
-
setAttribute
Sets the value of element's first attribute whose qualified name is qualifiedName to value.- Specified by:
setAttribute
in interfaceElement
- Parameters:
name
- aString
object.value
- aString
object.- Throws:
DOMException
-
removeAttribute
Removes element's first attribute whose qualified name is qualifiedName.- Specified by:
removeAttribute
in interfaceElement
- Parameters:
name
- aString
object.- Throws:
DOMException
-
getAttributeNode
getAttributeNode.
- Specified by:
getAttributeNode
in interfaceElement
- Parameters:
name
- aString
object.- Returns:
- a
Attr
object.
-
setAttributeNode
setAttributeNode.
- Specified by:
setAttributeNode
in interfaceElement
- Parameters:
newAttr
- aAttr
object.- Returns:
- a
Attr
object. - Throws:
DOMException
-
removeAttributeNode
removeAttributeNode.
- Specified by:
removeAttributeNode
in interfaceElement
- Parameters:
oldAttr
- aAttr
object.- Returns:
- a
Attr
object. - Throws:
DOMException
-
requestPointerLock
public void requestPointerLock()Description copied from interface:Element
requestPointerLock.
- Specified by:
requestPointerLock
in interfaceElement
-
scroll
public void scroll(int x, int y) Description copied from interface:Element
scroll.
-
scrollBy
public void scrollBy(int x, int y) Description copied from interface:Element
scrollBy.
-
scrollIntoView
public void scrollIntoView(boolean arg) Description copied from interface:Element
scrollIntoView.
- Specified by:
scrollIntoView
in interfaceElement
- Parameters:
arg
- a boolean.
-
scrollIntoView
public void scrollIntoView()Description copied from interface:Element
scrollIntoView.
- Specified by:
scrollIntoView
in interfaceElement
-
scrollTo
public void scrollTo(int x, int y) Description copied from interface:Element
scrollTo.
-
hasAttributes
public boolean hasAttributes()Returns true if element has attributes, and false otherwise.- Specified by:
hasAttributes
in interfaceNode
- Returns:
- a boolean.
-
getFeature
- Specified by:
getFeature
in interfaceNode
-
normalize
public final void normalize()Removes empty exclusive Text nodes and concatenates the data of remaining contiguous exclusive Text nodes into the first of their nodes. -
getAttributeNS
Returns element's attribute whose namespace is namespace and local name is localName, and null if there is no such attribute otherwise.- Specified by:
getAttributeNS
in interfaceElement
- Parameters:
namespaceURI
- aString
object.localName
- aString
object.- Returns:
- a
String
object.
-
getAttributeNames
Description copied from interface:Element
Returns the qualified names of all element's attributes. Can contain duplicates.- Specified by:
getAttributeNames
in interfaceElement
- Returns:
- an array of
String
objects.
-
setAttributeNS
public final void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException Sets the value of element's attribute whose namespace is namespace and local name is localName to value.- Specified by:
setAttributeNS
in interfaceElement
- Parameters:
namespaceURI
- aString
object.qualifiedName
- aString
object.value
- aString
object.- Throws:
DOMException
-
removeAttributeNS
Removes element's attribute whose namespace is namespace and local name is localName.- Specified by:
removeAttributeNS
in interfaceElement
- Parameters:
namespaceURI
- aString
object.localName
- aString
object.- Throws:
DOMException
-
getAttributeNodeNS
getAttributeNodeNS.
- Specified by:
getAttributeNodeNS
in interfaceElement
- Parameters:
namespaceURI
- aString
object.localName
- aString
object.- Returns:
- a
Attr
object.
-
setAttributeNodeNS
setAttributeNodeNS.
- Specified by:
setAttributeNodeNS
in interfaceElement
- Parameters:
newAttr
- aAttr
object.- Returns:
- a
Attr
object. - Throws:
DOMException
-
getName
getName.
-
getValue
getValue.
-
setValue
setValue.
-
setOwnerElement
Description copied from interface:Attr
setOwnerElement.
- Specified by:
setOwnerElement
in interfaceAttr
- Parameters:
element
- aNode
object.
-
getOwnerElement
getOwnerElement.
- Specified by:
getOwnerElement
in interfaceAttr
- Returns:
- a
Node
object.
-
adoptNode
Moves node from another document and returns it.If node is a document, throws a "NotSupportedError" DOMException or, if node is a shadow root, throws a "HierarchyRequestError" DOMException.
- Specified by:
adoptNode
in interfaceDocument
- Parameters:
source
- aNode
object.- Returns:
- a
Node
object. - Throws:
DOMException
-
caretRangeFromPoint
Description copied from interface:Document
caretRangeFromPoint.
- Specified by:
caretRangeFromPoint
in interfaceDocument
- Parameters:
x
- a double.y
- a double.- Returns:
- a
Range
object.
-
clear
public void clear()Description copied from interface:Document
clear.
-
close
public void close()Description copied from interface:Document
Closes an output stream and forces the sent data to display. -
getInputEncoding
Returns the character encoding used to create the webpage that is loaded into the document object.- Specified by:
getInputEncoding
in interfaceDocument
- Returns:
- a
String
object.
-
getLastModified
Description copied from interface:Document
Gets the date that the page was last modified, if the page supplies one.- Specified by:
getLastModified
in interfaceDocument
- Returns:
- a
String
object.
-
getLinks
Description copied from interface:Document
Retrieves a collection of all a objects that specify the href property and all area objects in the document.- Specified by:
getLinks
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getLocation
Description copied from interface:Document
Contains information about the current URL.- Specified by:
getLocation
in interfaceDocument
- Returns:
- a
Location
object.
-
setLocation
Description copied from interface:Document
setLocation.
- Specified by:
setLocation
in interfaceDocument
- Parameters:
location
- aLocation
object.
-
getOrigin
Description copied from interface:Document
Returns document's origin. -
getPlugins
Description copied from interface:Document
Return an HTMLCollection of the embed elements in the Document.- Specified by:
getPlugins
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getReadyState
Description copied from interface:Document
Retrieves a value that indicates the current state of the object.- Specified by:
getReadyState
in interfaceDocument
- Returns:
- a
DocumentReadyState
object.
-
getReferrer
Description copied from interface:Document
Gets the URL of the location that referred the user to the current page.- Specified by:
getReferrer
in interfaceDocument
- Returns:
- a
String
object.
-
getScripts
Description copied from interface:Document
Retrieves a collection of all script objects in the document.- Specified by:
getScripts
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getScrollingElement
Description copied from interface:Document
getScrollingElement.
- Specified by:
getScrollingElement
in interfaceDocument
- Returns:
- a
Element
object.
-
getTitle
Description copied from interface:Document
Contains the title of the document. -
setTitle
Description copied from interface:Document
setTitle.
-
getVisibilityState
Description copied from interface:Document
getVisibilityState.
- Specified by:
getVisibilityState
in interfaceDocument
- Returns:
- a
VisibilityState
object.
-
getStrictErrorChecking
public boolean getStrictErrorChecking()getStrictErrorChecking.
- Specified by:
getStrictErrorChecking
in interfaceDocument
- Returns:
- a boolean.
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking) setStrictErrorChecking.
- Specified by:
setStrictErrorChecking
in interfaceDocument
- Parameters:
strictErrorChecking
- a boolean.
-
getInnerHTML
Description copied from interface:Element
getInnerHTML.
- Specified by:
getInnerHTML
in interfaceElement
- Specified by:
getInnerHTML
in interfaceInnerHTML
- Returns:
- a
String
object.
-
getInnerText
Description copied from interface:Element
getInnerText.
- Specified by:
getInnerText
in interfaceElement
- Returns:
- a
String
object.
-
setInnerHTML
Description copied from interface:InnerHTML
setInnerHTML.
- Specified by:
setInnerHTML
in interfaceInnerHTML
- Parameters:
innerHTML
- aString
object.
-
getNextElementSibling
Description copied from interface:NonDocumentTypeChildNode
Returns the first following sibling that is an element, and null otherwise.- Specified by:
getNextElementSibling
in interfaceNonDocumentTypeChildNode
- Returns:
- a
Element
object.
-
getPreviousElementSibling
Description copied from interface:NonDocumentTypeChildNode
Returns the first preceding sibling that is an element, and null otherwise.- Specified by:
getPreviousElementSibling
in interfaceNonDocumentTypeChildNode
- Returns:
- a
Element
object.
-
getChildElementCount
public int getChildElementCount()Description copied from interface:ParentNode
getChildElementCount.
- Specified by:
getChildElementCount
in interfaceParentNode
- Returns:
- a
Integer
object.
-
getChildren
Description copied from interface:ParentNode
Returns the child elements.- Specified by:
getChildren
in interfaceParentNode
- Returns:
- a
HTMLCollection
object.
-
getFirstElementChild
Description copied from interface:ParentNode
Returns the first child that is an element, and null otherwise.- Specified by:
getFirstElementChild
in interfaceParentNode
- Returns:
- a
Element
object.
-
getLastElementChild
Description copied from interface:ParentNode
Returns the last child that is an element, and null otherwise.- Specified by:
getLastElementChild
in interfaceParentNode
- Returns:
- a
Element
object.
-
querySelector
Description copied from interface:ParentNode
Returns the first element that is a descendant of node that matches selectors.- Specified by:
querySelector
in interfaceParentNode
- Parameters:
selectors
- aString
object.- Returns:
- a
Element
object.
-
querySelectorAll
Description copied from interface:ParentNode
Returns all element descendants of node that match selectors.- Specified by:
querySelectorAll
in interfaceParentNode
- Parameters:
selectors
- aString
object.- Returns:
- a
NodeList
object.
-
addEventListener
Description copied from interface:EventTarget
addEventListener.
- Specified by:
addEventListener
in interfaceEventTarget
- Parameters:
type
- aString
object.listener
- aFunction
object.
-
addEventListener
Description copied from interface:EventTarget
addEventListener.
- Specified by:
addEventListener
in interfaceEventTarget
- Parameters:
type
- aString
object.listener
- aFunction
object.useCapture
- a boolean.
-
removeEventListener
Description copied from interface:EventTarget
removeEventListener.
- Specified by:
removeEventListener
in interfaceEventTarget
- Parameters:
type
- aString
object.listener
- aFunction
object.
-
removeEventListener
Description copied from interface:EventTarget
removeEventListener.
- Specified by:
removeEventListener
in interfaceEventTarget
- Parameters:
type
- aString
object.listener
- aFunction
object.useCapture
- a boolean.
-
dispatchEvent
Description copied from interface:EventTarget
dispatchEvent.
- Specified by:
dispatchEvent
in interfaceEventTarget
- Parameters:
element
- aNode
object.evt
- aEvent
object.- Returns:
- a boolean.
-
dispatchEvent
Description copied from interface:EventTarget
dispatchEvent.
- Specified by:
dispatchEvent
in interfaceEventTarget
- Parameters:
evt
- aEvent
object.- Returns:
- a boolean.
- Throws:
EventException
- if any.
-
createNodeIterator
Description copied from interface:DocumentTraversal
Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.- Specified by:
createNodeIterator
in interfaceDocumentTraversal
- Parameters:
root
- aNode
object.- Throws:
DOMException
-
createNodeIterator
Description copied from interface:DocumentTraversal
Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.- Specified by:
createNodeIterator
in interfaceDocumentTraversal
- Parameters:
root
- aNode
object.whatToShow
- aInteger
object.- Throws:
DOMException
-
createNodeIterator
Description copied from interface:DocumentTraversal
Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.- Specified by:
createNodeIterator
in interfaceDocumentTraversal
- Parameters:
root
- aNode
object.filter
- aNodeFilter
object.- Throws:
DOMException
-
createNodeIterator
public NodeIterator createNodeIterator(Node root, int whatToShow, NodeFilter filter) throws DOMException Description copied from interface:DocumentTraversal
Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.- Specified by:
createNodeIterator
in interfaceDocumentTraversal
- Parameters:
root
- aNode
object.whatToShow
- aInteger
object.filter
- aNodeFilter
object.- Throws:
DOMException
-
createTreeWalker
Description copied from interface:DocumentTraversal
createTreeWalker.
- Specified by:
createTreeWalker
in interfaceDocumentTraversal
- Parameters:
root
- aNode
object.- Throws:
DOMException
-
createTreeWalker
Description copied from interface:DocumentTraversal
createTreeWalker.
- Specified by:
createTreeWalker
in interfaceDocumentTraversal
- Parameters:
root
- aNode
object.whatToShow
- aInteger
object.- Throws:
DOMException
-
createTreeWalker
Description copied from interface:DocumentTraversal
createTreeWalker.
- Specified by:
createTreeWalker
in interfaceDocumentTraversal
- Parameters:
root
- aNode
object.filter
- aNodeFilter
object.- Throws:
DOMException
-
createTreeWalker
public TreeWalker createTreeWalker(Node root, int whatToShow, NodeFilter filter) throws DOMException Description copied from interface:DocumentTraversal
createTreeWalker.
- Specified by:
createTreeWalker
in interfaceDocumentTraversal
- Parameters:
root
- aNode
object.whatToShow
- aInteger
object.filter
- aNodeFilter
object.- Throws:
DOMException
-
setUserData
setUserData.
- Specified by:
setUserData
in interfaceNode
- Parameters:
key
- aString
object.data
- aObject
object.handler
- aUserDataHandler
object.- Returns:
- a
Object
object.
-
contains
Description copied from interface:Node
Returns true if other is an inclusive descendant of node, and false otherwise. -
getUserData
getUserData.
- Specified by:
getUserData
in interfaceNode
- Parameters:
key
- aString
object.- Returns:
- a
Object
object.
-
isEqualNode
Returns whether node and otherNode have the same properties.- Specified by:
isEqualNode
in interfaceNode
- Parameters:
arg
- aNode
object.- Returns:
- a boolean.
-
lookupNamespaceURI
lookupNamespaceURI.
- Specified by:
lookupNamespaceURI
in interfaceNode
- Parameters:
specifiedPrefix
- aString
object.- Returns:
- a
String
object.
-
isDefaultNamespace
isDefaultNamespace.
- Specified by:
isDefaultNamespace
in interfaceNode
- Parameters:
namespaceURI
- aString
object.- Returns:
- a boolean.
-
lookupPrefix
lookupPrefix.
- Specified by:
lookupPrefix
in interfaceNode
- Parameters:
namespaceURI
- aString
object.- Returns:
- a
String
object.
-
isSameNode
isSameNode.
- Specified by:
isSameNode
in interfaceNode
- Parameters:
other
- aNode
object.- Returns:
- a boolean.
-
setTextContent
setTextContent.
- Specified by:
setTextContent
in interfaceNode
- Parameters:
textContent
- aString
object.- Throws:
DOMException
-
getTextContent
getTextContent.
- Specified by:
getTextContent
in interfaceNode
- Returns:
- a
String
object. - Throws:
DOMException
-
compareDocumentPosition
compareDocumentPosition.
- Specified by:
compareDocumentPosition
in interfaceNode
- Parameters:
other
- aNode
object.- Returns:
- a short.
- Throws:
DOMException
-
getBaseURI
Returns node's node document's document base URL.- Specified by:
getBaseURI
in interfaceNode
- Returns:
- a
String
object.
-
normalizeDocument
public void normalizeDocument()normalizeDocument.
- Specified by:
normalizeDocument
in interfaceDocument
-
createExpression
Description copied from interface:Document
createExpression.
- Specified by:
createExpression
in interfaceDocument
- Returns:
- a
XPathExpression
object.
-
createNSResolver
Description copied from interface:Document
createNSResolver.
- Specified by:
createNSResolver
in interfaceDocument
- Parameters:
nodeResolver
- aNode
object.- Returns:
- a
XPathNSResolver
object.
-
evaluate
public XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, short type, Object result) Description copied from interface:Document
evaluate.
- Specified by:
evaluate
in interfaceDocument
- Parameters:
expression
- aString
object.contextNode
- aNode
object.resolver
- aXPathNSResolver
object.type
- a short.result
- aObject
object.- Returns:
- a
XPathResult
object.
-
getDomConfig
getDomConfig.
- Specified by:
getDomConfig
in interfaceDocument
- Returns:
- a
DOMConfiguration
object.
-
setDocumentURI
setDocumentURI.
- Specified by:
setDocumentURI
in interfaceDocument
- Parameters:
documentURI
- aString
object.
-
getDocumentURI
Returns document's URL.- Specified by:
getDocumentURI
in interfaceDocument
- Returns:
- a
String
object.
-
getDomain
Description copied from interface:Document
Sets or gets the security domain of the document. -
setDomain
Description copied from interface:Document
setDomain.
-
getEmbeds
Description copied from interface:Document
Retrieves a collection of all embed objects in the document.- Specified by:
getEmbeds
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getFgColor
Description copied from interface:Document
Sets or gets the foreground (text) color of the document.- Specified by:
getFgColor
in interfaceDocument
- Returns:
- a
String
object.
-
setFgColor
Description copied from interface:Document
setFgColor.
- Specified by:
setFgColor
in interfaceDocument
- Parameters:
fgColor
- aString
object.
-
getForms
Description copied from interface:Document
Retrieves a collection, in source order, of all form objects in the document.- Specified by:
getForms
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
isFullscreen
public boolean isFullscreen()Description copied from interface:Document
isFullscreen.
- Specified by:
isFullscreen
in interfaceDocument
- Returns:
- a boolean.
-
isFullscreenEnabled
public boolean isFullscreenEnabled()Description copied from interface:Document
Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise.- Specified by:
isFullscreenEnabled
in interfaceDocument
- Returns:
- a boolean.
-
getHead
Description copied from interface:Document
Returns the head element.- Specified by:
getHead
in interfaceDocument
- Returns:
- a
HTMLHeadElement
object.
-
isHidden
public boolean isHidden()Description copied from interface:Document
isHidden.
-
getImages
Description copied from interface:Document
Retrieves a collection, in source order, of img objects in the document.- Specified by:
getImages
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
replaceWholeText
replaceWholeText.
- Specified by:
replaceWholeText
in interfaceText
- Parameters:
content
- aString
object.- Returns:
- a
Text
object. - Throws:
DOMException
-
getAssignedSlot
Description copied from interface:Text
getAssignedSlot.
- Specified by:
getAssignedSlot
in interfaceText
- Returns:
- a
HTMLSlotElement
object.
-
getWholeText
Returns the combined data of all direct Text node siblings.- Specified by:
getWholeText
in interfaceText
- Returns:
- a
String
object.
-
isElementContentWhitespace
public boolean isElementContentWhitespace()isElementContentWhitespace.
- Specified by:
isElementContentWhitespace
in interfaceText
- Returns:
- a boolean.
-
setIdAttribute
setIdAttribute.
- Specified by:
setIdAttribute
in interfaceElement
- Parameters:
name
- aString
object.makeId
- a boolean.
-
setIdAttributeNode
setIdAttributeNode.
- Specified by:
setIdAttributeNode
in interfaceElement
- Parameters:
at
- aAttr
object.makeId
- a boolean.
-
setIdAttributeNS
setIdAttributeNode.
- Specified by:
setIdAttributeNS
in interfaceElement
- Parameters:
namespaceURI
- aString
object.localName
- aString
object.makeId
- a boolean.
-
setPointerCapture
public void setPointerCapture(int pointerId) Description copied from interface:Element
setPointerCapture.
- Specified by:
setPointerCapture
in interfaceElement
- Parameters:
pointerId
- aInteger
object.
-
toggleAttribute
Description copied from interface:Element
If force is not given, "toggles" qualifiedName, removing it if it is present and adding it if it is not present. If force is true, adds qualifiedName. If force is false, removes qualifiedName.Returns true if qualifiedName is now present, and false otherwise.
- Specified by:
toggleAttribute
in interfaceElement
- Parameters:
qualifiedName
- aString
object.force
- a boolean.- Returns:
- a boolean.
-
toggleAttribute
Description copied from interface:Element
toggleAttribute.
- Specified by:
toggleAttribute
in interfaceElement
- Parameters:
qualifiedName
- aString
object.- Returns:
- a boolean.
-
insertAdjacentElement
Description copied from interface:Element
insertAdjacentElement.
- Specified by:
insertAdjacentElement
in interfaceElement
- Parameters:
where
- aString
object.insertedElement
-Node
object.- Returns:
- a
Node
object.
-
insertAdjacentHTML
Description copied from interface:Element
insertAdjacentHTML.
- Specified by:
insertAdjacentHTML
in interfaceElement
- Parameters:
position
- aString
object.text
- aString
object.
-
getSchemaTypeInfo
getSchemaTypeInfo.
- Specified by:
getSchemaTypeInfo
in interfaceAttr
- Specified by:
getSchemaTypeInfo
in interfaceElement
- Returns:
- a
TypeInfo
object.
-
setOuterHTML
Description copied from interface:Element
setOuterHTML.
- Specified by:
setOuterHTML
in interfaceElement
- Parameters:
outerHTML
- aString
object.
-
isSpecified
public boolean isSpecified()Description copied from interface:Attr
isSpecified.
- Specified by:
isSpecified
in interfaceAttr
- Returns:
- a boolean.
-
isId
public boolean isId()isId.
-
getXmlEncoding
getXmlEncoding.
- Specified by:
getXmlEncoding
in interfaceDocument
- Returns:
- a
String
object.
-
getXmlStandalone
public boolean getXmlStandalone()getXmlStandalone.
- Specified by:
getXmlStandalone
in interfaceDocument
- Returns:
- a boolean.
-
setXmlStandalone
setXmlStandalone.
- Specified by:
setXmlStandalone
in interfaceDocument
- Parameters:
xmlStandalone
- a boolean.- Throws:
DOMException
-
getXmlVersion
getXmlVersion.
- Specified by:
getXmlVersion
in interfaceDocument
- Returns:
- a
String
object.
-
setXmlVersion
setXmlVersion.
- Specified by:
setXmlVersion
in interfaceDocument
- Parameters:
xmlVersion
- aString
object.- Throws:
DOMException
-
hasFocus
public boolean hasFocus()Description copied from interface:Document
Gets a value indicating whether the object currently has focus.
-