Class DocumentImpl
- All Implemented Interfaces:
Cloneable
,EventTarget
,ModelNode
,Document
,Node
,NonElementParentNode
,ParentNode
,DocumentRange
,XPathEvaluator
,ScriptableDelegate
,DocumentTraversal
- Direct Known Subclasses:
HTMLDocumentImpl
DocumentImpl class.
-
Field Summary
Fields inherited from class org.loboevolution.html.dom.nodeimpl.NodeImpl
document, nodeList, notificationsSuspended, parentNode, uiNode
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
-
Method Summary
Modifier and TypeMethodDescriptionMoves node from another document and returns it.caretRangeFromPoint
(double x, double y) caretRangeFromPoint.void
clear()
clear.void
close()
Closes an output stream and forces the sent data to display.createAttribute
(String name) Creates an attribute object with a specified name.createAttributeNS
(String nUri, String qName) createAttributeNS.createCDATASection
(String data) Returns a CDATASection node whose data is data.createComment
(String data) Creates a comment object with the specified data.Creates a new document.createElement
(String tn) Creates an instance of the element for the specified tag.createElementNS
(String nUri, String qName) createElementNS.createElementNS
(String namespaceURI, String qualifiedName, String options) Returns an element with namespace.createEntityReference
(String entity) createEvent
(String eventType) createEvent.createExpression.createExpression
(String expression, XPathNSResolver resolver) Creates a parsed XPath expression with resolved namespaces.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.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.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.elementFromPoint
(double x, double y) Returns the element for the specified x coordinate and the specified y coordinate.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.Returns node's node document's document base URL.Deprecated.getBody()
Specifies the beginning and end of the document body.Returns document's encoding.Gets or sets the character set used to encode the object.int
getChildElementCount.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.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.Gets an object representing the document type declaration associated with the current document.Gets a reference to the root node of the document.Returns document's URL.Sets or gets the security domain of the document.getDomConfig.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.getElementsByTagName
(String tagname) Retrieves a collection of objects based on the specified element name.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.Sets or gets the foreground (text) color of the document.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.Retrieves a collection, in source order, of img objects in the document.Gets the implementation object of the current document.Returns the character encoding used to create the webpage that is loaded into the document object.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.getLinks()
Retrieves a collection of all a objects that specify the href property and all area objects in the document.getLocalName.Contains information about the current URL.Returns a string appropriate for the type of node.int
Returns the type of node.getNodeValue.Returns document's origin.Return an HTMLCollection of the embed elements in the Document.Retrieves a value that indicates the current state of the object.Retrieves a collection of all script objects in the document.getScrollingElement.Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.boolean
getStrictErrorChecking.getTitle()
Contains the title of the document.getURL()
Sets or gets the URL for the current document.getVisibilityState.getXmlEncoding.boolean
getXmlStandalone.getXmlVersion.boolean
Returns true if element has attributes, and false otherwise.boolean
hasFocus()
Gets a value indicating whether the object currently has focus.importNode
(Node importedNode, boolean deep) Returns a copy of node.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
isXml()
void
normalizeDocument.open()
open.open.open.open.Opens a new window and loads a document specified by a given URL.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 selector) Returns all element descendants of node that match selectors.void
releaseEvents.void
renameNode
(Node node, String namespaceURI, String qualifiedName) void
setBgColor
(String bgColor) setBgColor.void
setBody
(HTMLElement body) setBody.void
setCookie.void
setDesignMode
(String designMode) setDesignMode.void
setDir.void
setDoctype
(DocumentType doctype) Setter for the field doctype.void
setDocumentURI
(String documentURI) setDocumentURI.void
setDomain.void
setFgColor
(String fgColor) setFgColor.void
setLocation
(Location location) setLocation.void
setNodeValue
(String nodeValue) setNodeValue.void
setStrictErrorChecking
(boolean strictErrorChecking) setStrictErrorChecking.void
setTitle.void
setWindow
(HtmlRendererContext rcontext, UserAgentContext ucontext, HtmlRendererConfig config) void
setXml
(boolean xml) void
setXmlStandalone
(boolean xmlStandalone) setXmlStandalone.void
setXmlVersion
(String xmlVersion) setXmlVersion.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.Methods inherited from class org.loboevolution.html.dom.nodeimpl.NodeImpl
appendChild, appendInnerHTMLImpl, appendInnerTextImpl, clone, cloneNode, cloneNode, compareDocumentPosition, contains, createRenderState, findUINode, forgetRenderState, getATTRIBUTE_NODE, getAttributes, getCDATA_SECTION_NODE, getChildIndex, getChildNodes, getChildren, getCOMMENT_NODE, getDescendents, getDOCUMENT_FRAGMENT_NODE, getDOCUMENT_NODE, getDOCUMENT_POSITION_CONTAINED_BY, getDOCUMENT_POSITION_CONTAINS, getDOCUMENT_POSITION_DISCONNECTED, getDOCUMENT_POSITION_FOLLOWING, getDOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, getDOCUMENT_POSITION_PRECEDING, getDOCUMENT_TYPE_NODE, getDocumentItem, getDocumentNode, getDocumentURL, getELEMENT_NODE, getENTITY_NODE, getENTITY_REFERENCE_NODE, getFeature, getFirstChild, getFirstChildByFilter, getFullURL, getHtmlRendererConfig, getHtmlRendererContext, getLastChild, getNamespaceURI, getNextElementSibling, getNextSibling, getNodeList, getNONE, getNOTATION_NODE, getOwnerDocument, getParentElement, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousElementSibling, getPreviousSibling, getPROCESSING_INSTRUCTION_NODE, getRenderState, getRootNode, getTEXT_NODE, getTextContent, getUINode, getUserAgentContext, getUserData, hasChildNodes, htmlEncodeChildText, informInvalid, informLayoutInvalid, informLookInvalid, informNodeLoaded, informPositionInvalid, informSizeInvalid, informStructureInvalid, insertAfter, insertAt, insertBefore, isDefaultNamespace, isEqualNode, isEqualOrDescendentOf, isIsConnected, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, prepend, prependChild, removeChild, removeChildAt, removeChildrenImpl, removeTableChildren, replaceAdjacentTextNodes, replaceChild, setDocumentItem, setOwnerDocument, setOwnerDocument, setParentImpl, setPrefix, setTextContent, setUINode, setUserData, toString, visit, visitImpl, warn, warn
Methods inherited from class org.loboevolution.html.dom.nodeimpl.event.EventTargetImpl
addEventListener, addEventListener, dispatchEvent, dispatchEvent, getFunction, removeEventListener, removeEventListener
Methods inherited from class org.loboevolution.js.AbstractScriptableDelegate
getScriptable, setScriptable
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.loboevolution.html.node.Document
getReferrer
Methods inherited from interface org.loboevolution.events.EventTarget
addEventListener, addEventListener, dispatchEvent, dispatchEvent, removeEventListener, removeEventListener
Methods inherited from interface org.loboevolution.html.node.Node
appendChild, cloneNode, cloneNode, compareDocumentPosition, contains, getAttributes, getChildNodes, getFeature, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousSibling, getRootNode, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isIsConnected, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, prepend, prependChild, removeChild, replaceChild, setOwnerDocument, setPrefix, setTextContent, setUserData
Methods inherited from interface org.loboevolution.html.node.ParentNode
getChildren
-
Field Details
-
reader
-
-
Constructor Details
-
DocumentImpl
public DocumentImpl()
-
-
Method Details
-
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.
-
renameNode
- Specified by:
renameNode
in interfaceDocument
-
createElement
Creates an instance of the element for the specified tag.- Specified by:
createElement
in interfaceDocument
- Parameters:
tn
- The name of an element.- Returns:
- a
Element
object.
-
createEntityReference
- Specified by:
createEntityReference
in interfaceDocument
-
createElementNS
createElementNS.
- Specified by:
createElementNS
in interfaceDocument
- Parameters:
nUri
- aString
object.qName
- aString
object.- Returns:
- a
Element
object.
-
createElementNS
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.
-
getElementsByClassName
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
- Parameters:
classNames
- aString
object.- Returns:
- a
HTMLCollection
object.
-
getElementsByTagName
Retrieves a collection of objects based on the specified element name.- Specified by:
getElementsByTagName
in interfaceDocument
- Parameters:
tagname
- Specifies the name of an element.- Returns:
- a
HTMLCollection
object.
-
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
- Parameters:
namespaceURI
- aString
object.localName
- aString
object.- Returns:
- a
HTMLCollection
object.
-
getFirstElementChild
Returns the first child that is an element, and null otherwise.- Specified by:
getFirstElementChild
in interfaceParentNode
- Returns:
- a
Element
object.
-
getLastElementChild
Returns the last child that is an element, and null otherwise.- Specified by:
getLastElementChild
in interfaceParentNode
- Returns:
- a
Element
object.
-
getChildElementCount
public int getChildElementCount()getChildElementCount.
- Specified by:
getChildElementCount
in interfaceParentNode
- Returns:
- a
Integer
object.
-
querySelector
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
Returns all element descendants of node that match selectors.- Specified by:
querySelectorAll
in interfaceParentNode
- Parameters:
selector
- aString
object.- Returns:
- a
NodeList
object.
-
getDoctype
Gets an object representing the document type declaration associated with the current document.- Specified by:
getDoctype
in interfaceDocument
- Returns:
- a
DocumentType
object.
-
setDoctype
Setter for the field doctype.
- Parameters:
doctype
- aDocumentType
object.
-
getDocumentElement
Gets a reference to the root node of the document.- Specified by:
getDocumentElement
in interfaceDocument
- Returns:
- a
Element
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.
-
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.
-
createAttributeNS
createAttributeNS.
- Specified by:
createAttributeNS
in interfaceDocument
- Parameters:
nUri
- aString
object.qName
- aString
object.- Returns:
- a
Attr
object. - Throws:
DOMException
-
createCDATASection
Returns a CDATASection node whose data is data.- Specified by:
createCDATASection
in interfaceDocument
- Parameters:
data
- aString
object.- Returns:
- a
CDATASection
object.
-
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.
-
createDocumentFragment
Creates a new document.- Specified by:
createDocumentFragment
in interfaceDocument
- Returns:
- a
DocumentFragment
object.
-
createProcessingInstruction
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.
-
getDomConfig
getDomConfig.
- Specified by:
getDomConfig
in interfaceDocument
- Returns:
- a
DOMConfiguration
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.
-
getImplementation
Gets the implementation object of the current document.- Specified by:
getImplementation
in interfaceDocument
- Returns:
- a
DOMImplementation
object.
-
getDocumentURI
Returns document's URL.- Specified by:
getDocumentURI
in interfaceDocument
- Returns:
- a
String
object.
-
getBaseURI
Returns node's node document's document base URL.- Specified by:
getBaseURI
in interfaceNode
- Overrides:
getBaseURI
in classNodeImpl
- Returns:
- a
String
object.
-
setDocumentURI
setDocumentURI.
- Specified by:
setDocumentURI
in interfaceDocument
- Parameters:
documentURI
- aString
object.
-
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.
-
getXmlEncoding
getXmlEncoding.
- Specified by:
getXmlEncoding
in interfaceDocument
- Returns:
- a
String
object.
-
normalizeDocument
public void normalizeDocument()normalizeDocument.
- Specified by:
normalizeDocument
in interfaceDocument
-
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.
-
getXmlStandalone
public boolean getXmlStandalone()getXmlStandalone.
- Specified by:
getXmlStandalone
in interfaceDocument
- Returns:
- a boolean.
-
getXmlVersion
getXmlVersion.
- Specified by:
getXmlVersion
in interfaceDocument
- Returns:
- a
String
object.
-
setXmlStandalone
public void setXmlStandalone(boolean xmlStandalone) setXmlStandalone.
- Specified by:
setXmlStandalone
in interfaceDocument
- Parameters:
xmlStandalone
- a boolean.
-
setXmlVersion
setXmlVersion.
- Specified by:
setXmlVersion
in interfaceDocument
- Parameters:
xmlVersion
- aString
object.
-
createEvent
createEvent.
- Specified by:
createEvent
in interfaceDocument
- Parameters:
eventType
- aString
object.- Returns:
- a
Event
object. - Throws:
DOMException
-
createExpression
Creates a parsed XPath expression with resolved namespaces. This is useful when an expression will be reused in an application since it makes it possible to compile the expression string into a more efficient internal form and preresolve all namespace prefixes which occur within the expression.- Specified by:
createExpression
in interfaceXPathEvaluator
- Parameters:
expression
- The XPath expression string to be parsed.resolver
- The resolver permits translation of prefixes within the XPath expression into appropriate namespace URIs . If this is specified as null, any namespace prefix within the expression will result in DOMException being thrown with the code NAMESPACE_ERR.- Returns:
- The compiled form of the XPath expression.
-
createNSResolver
createNSResolver.
- Specified by:
createNSResolver
in interfaceDocument
- Specified by:
createNSResolver
in interfaceXPathEvaluator
- Parameters:
nodeResolver
- aNode
object.- Returns:
- a
XPathNSResolver
object.
-
evaluate
public XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, short type, Object result) evaluate.
- Specified by:
evaluate
in interfaceDocument
- Specified by:
evaluate
in interfaceXPathEvaluator
- Parameters:
expression
- aString
object.contextNode
- aNode
object.resolver
- aXPathNSResolver
object.type
- a short.result
- aObject
object.- Returns:
- a
XPathResult
object.
-
createExpression
createExpression.
- Specified by:
createExpression
in interfaceDocument
- Returns:
- a
XPathExpression
object.
-
getURL
Sets or gets the URL for the current document. -
getActiveElement
Gets the object that has the focus when the parent document has focus.- Specified by:
getActiveElement
in interfaceDocument
- Returns:
- a
Element
object.
-
getBgColor
Deprecated. Sets or retrieves a value that indicates the background color behind the object.- Specified by:
getBgColor
in interfaceDocument
- Returns:
- a
String
object.
-
setBgColor
setBgColor.
- Specified by:
setBgColor
in interfaceDocument
- Parameters:
bgColor
- aString
object.
-
getCharacterSet
Returns document's encoding.- Specified by:
getCharacterSet
in interfaceDocument
- Returns:
- a
String
object.
-
getCharset
Gets or sets the character set used to encode the object.- Specified by:
getCharset
in interfaceDocument
- Returns:
- a
String
object.
-
getCompatMode
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
Returns document's content type.- Specified by:
getContentType
in interfaceDocument
- Returns:
- a
String
object.
-
getCookie
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
setCookie.
-
getCurrentScript
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
getDefaultView.
- Specified by:
getDefaultView
in interfaceDocument
- Returns:
- a
Window
object.
-
setWindow
public void setWindow(HtmlRendererContext rcontext, UserAgentContext ucontext, HtmlRendererConfig config) -
getDesignMode
Sets or gets a value that indicates whether the document can be edited.- Specified by:
getDesignMode
in interfaceDocument
- Returns:
- a
String
object.
-
setDesignMode
setDesignMode.
- Specified by:
setDesignMode
in interfaceDocument
- Parameters:
designMode
- aString
object.
-
getDir
Sets or retrieves a value that indicates the reading order of the object. -
setDir
setDir.
-
getDomain
Sets or gets the security domain of the document. -
setDomain
setDomain.
-
getFgColor
Sets or gets the foreground (text) color of the document.- Specified by:
getFgColor
in interfaceDocument
- Returns:
- a
String
object.
-
setFgColor
setFgColor.
- Specified by:
setFgColor
in interfaceDocument
- Parameters:
fgColor
- aString
object.
-
isFullscreen
public boolean isFullscreen()isFullscreen.
- Specified by:
isFullscreen
in interfaceDocument
- Returns:
- a boolean.
-
isFullscreenEnabled
public boolean isFullscreenEnabled()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.
-
isHidden
public boolean isHidden()isHidden.
-
getHead
Returns the head element.- Specified by:
getHead
in interfaceDocument
- Returns:
- a
HTMLHeadElement
object.
-
getBody
Specifies the beginning and end of the document body.- Specified by:
getBody
in interfaceDocument
- Returns:
- a
HTMLElement
object.
-
setBody
setBody.
- Specified by:
setBody
in interfaceDocument
- Parameters:
body
- aHTMLElement
object.
-
getApplets
Retrieves a collection of all applet objects in the document.- Specified by:
getApplets
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getImages
Retrieves a collection, in source order, of img objects in the document.- Specified by:
getImages
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getLinks
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.
-
getForms
Retrieves a collection, in source order, of all form objects in the document.- Specified by:
getForms
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getEmbeds
Retrieves a collection of all embed objects in the document.- Specified by:
getEmbeds
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getPlugins
Return an HTMLCollection of the embed elements in the Document.- Specified by:
getPlugins
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getScripts
Retrieves a collection of all script objects in the document.- Specified by:
getScripts
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getCommands
getCommands.
- Specified by:
getCommands
in interfaceDocument
- Returns:
- a
HTMLCollection
object.
-
getAnchors
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.
-
getall
Returns a reference to the collection of elements contained by the object.- Specified by:
getall
in interfaceDocument
- Returns:
- a
HTMLAllCollection
object.
-
getElementsByName
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.
-
getLastModified
Gets the date that the page was last modified, if the page supplies one.- Specified by:
getLastModified
in interfaceDocument
- Returns:
- a
String
object.
-
getLocation
Contains information about the current URL.- Specified by:
getLocation
in interfaceDocument
- Returns:
- a
Location
object.
-
setLocation
setLocation.
- Specified by:
setLocation
in interfaceDocument
- Parameters:
location
- aLocation
object.
-
getOrigin
Returns document's origin. -
getReadyState
Retrieves a value that indicates the current state of the object.- Specified by:
getReadyState
in interfaceDocument
- Returns:
- a
DocumentReadyState
object.
-
getScrollingElement
getScrollingElement.
- Specified by:
getScrollingElement
in interfaceDocument
- Returns:
- a
Element
object.
-
getTitle
Contains the title of the document. -
setTitle
setTitle.
-
getVisibilityState
getVisibilityState.
- Specified by:
getVisibilityState
in interfaceDocument
- Returns:
- a
VisibilityState
object.
-
caretRangeFromPoint
caretRangeFromPoint.
- Specified by:
caretRangeFromPoint
in interfaceDocument
- Parameters:
x
- a double.y
- a double.- Returns:
- a
Range
object.
-
clear
public void clear()clear.
-
close
public void close()Closes an output stream and forces the sent data to display. -
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
-
createRange
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.
-
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
-
elementFromPoint
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
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
execCommand.
- Specified by:
execCommand
in interfaceDocument
- Parameters:
commandId
- aString
object.showUI
- a boolean.- Returns:
- a boolean.
-
execCommand
execCommand.
- Specified by:
execCommand
in interfaceDocument
- Parameters:
commandId
- aString
object.- Returns:
- a boolean.
-
getSelection
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.
-
hasFocus
public boolean hasFocus()Gets a value indicating whether the object currently has focus. -
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
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
open.
-
open
open.
-
open
open.
-
open
open.
-
removeAllChildrenImpl
public void removeAllChildrenImpl() -
queryCommandEnabled
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
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
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
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
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()releaseEvents.
- Specified by:
releaseEvents
in interfaceDocument
-
write
Writes one or more HTML expressions to a document in the specified window. -
writeln
Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. -
hasAttributes
public boolean hasAttributes()Description copied from interface:Node
Returns true if element has attributes, and false otherwise.- Specified by:
hasAttributes
in interfaceNode
- Returns:
- a boolean.
-
isXml
public boolean isXml() -
setXml
public void setXml(boolean xml) -
getLocalName
Description copied from class:NodeImpl
getLocalName.
- Specified by:
getLocalName
in interfaceNode
- Specified by:
getLocalName
in classNodeImpl
- Returns:
- a
String
object.
-
getNodeType
public int getNodeType()Description copied from class:NodeImpl
Returns the type of node.- Specified by:
getNodeType
in interfaceNode
- Specified by:
getNodeType
in classNodeImpl
- Returns:
- a
Integer
object.
-
getNodeValue
Description copied from class:NodeImpl
getNodeValue.
- Specified by:
getNodeValue
in interfaceNode
- Specified by:
getNodeValue
in classNodeImpl
- Returns:
- a
String
object. - Throws:
DOMException
-
setNodeValue
Description copied from class:NodeImpl
setNodeValue.
- Specified by:
setNodeValue
in interfaceNode
- Specified by:
setNodeValue
in classNodeImpl
- Parameters:
nodeValue
- aString
object.- Throws:
DOMException
-
getNodeName
Description copied from class:NodeImpl
Returns a string appropriate for the type of node.- Specified by:
getNodeName
in interfaceNode
- Specified by:
getNodeName
in classNodeImpl
- Returns:
- a
String
object.
-