Class DocumentImpl
- All Implemented Interfaces:
Cloneable,EventTarget,Document,ModelNode,Node,NonElementParentNode,ParentNode,DocumentRange,XPathEvaluator,ScriptableDelegate,DocumentTraversal
- Direct Known Subclasses:
HTMLDocumentImpl
DocumentImpl class.
-
Field Summary
FieldsFields inherited from class org.loboevolution.html.dom.nodeimpl.NodeImpl
document, nodeList, notificationsSuspended, parentNode, uiNodeFields inherited from interface org.loboevolution.html.node.Document
HTML_NAMESPACE_URI, NAMESPACE_SVG, XML_NAMESPACE_URI, XMLNS_NAMESPACE_URIFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMoves node from another document and returns it.caretRangeFromPoint(double x, double y) caretRangeFromPoint.voidclear()clear.voidclose()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.booleanexecCommand(String commandId) execCommand.booleanexecCommand(String commandId, boolean showUI) execCommand.booleanexecCommand(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.intgetChildElementCount.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.intReturns 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.booleangetStrictErrorChecking.getTitle()Contains the title of the document.getURL()Sets or gets the URL for the current document.getVisibilityState.getXmlEncoding.booleangetXmlStandalone.getXmlVersion.booleanReturns true if element has attributes, and false otherwise.booleanhasFocus()Gets a value indicating whether the object currently has focus.importNode(Node importedNode, boolean deep) Returns a copy of node.booleanisFullscreen.booleanReturns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise.booleanisHidden()isHidden.booleanisXml()voidnormalizeDocument.open()open.open.open.open.Opens a new window and loads a document specified by a given URL.booleanqueryCommandEnabled(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.booleanqueryCommandIndeterm(String commandId) Returns a Boolean value that indicates whether the specified command is in the indeterminate state.booleanqueryCommandState(String commandId) Returns a Boolean value that indicates the current state of the command.booleanqueryCommandSupported(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.voidreleaseEvents.voidrenameNode(Node node, String namespaceURI, String qualifiedName) voidsetBgColor(String bgColor) setBgColor.voidsetBody(HTMLElement body) setBody.voidsetCookie.voidsetDesignMode(String designMode) setDesignMode.voidsetDir.voidsetDoctype(DocumentType doctype) Setter for the field doctype.voidsetDocumentURI(String documentURI) setDocumentURI.voidsetDomain.voidsetFgColor(String fgColor) setFgColor.voidsetLocation(Location location) setLocation.voidsetNodeValue(String nodeValue) setNodeValue.voidsetStrictErrorChecking(boolean strictErrorChecking) setStrictErrorChecking.voidsetTitle.voidsetWindow(HtmlRendererContext rcontext, UserAgentContext ucontext, HtmlRendererConfig config) voidsetXml(boolean xml) voidsetXmlStandalone(boolean xmlStandalone) setXmlStandalone.voidsetXmlVersion(String xmlVersion) setXmlVersion.voidWrites one or more HTML expressions to a document in the specified window.voidWrites 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, appendChildrenToCollectionImpl, appendInnerHTMLImpl, appendInnerTextImpl, clone, cloneNode, cloneNode, compareDocumentPosition, contains, createRenderState, extractDescendentsArrayImpl, 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, getNextTo, getNodeList, getNONE, getNOTATION_NODE, getOwnerDocument, getParentElement, getParentModelNode, getParentNode, getParentRenderState, getPrefix, getPreviousElementSibling, getPreviousSibling, getPreviousTo, 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, warnMethods inherited from class org.loboevolution.html.dom.nodeimpl.event.EventTargetImpl
addEventListener, addEventListener, dispatchEvent, dispatchEvent, getFunction, removeEventListener, removeEventListenerMethods inherited from class org.loboevolution.js.AbstractScriptableDelegate
getScriptable, setScriptableMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.loboevolution.html.node.Document
getReferrerMethods inherited from interface org.loboevolution.events.EventTarget
addEventListener, addEventListener, dispatchEvent, dispatchEvent, removeEventListener, removeEventListenerMethods inherited from interface org.loboevolution.html.node.ModelNode
getDocumentItem, getFullURL, getParentModelNode, getRenderState, isEqualOrDescendentOf, setDocumentItem, warnMethods inherited from interface org.loboevolution.html.node.Node
appendChild, appendChildrenToCollectionImpl, cloneNode, cloneNode, compareDocumentPosition, contains, extractDescendentsArrayImpl, findUINode, forgetRenderState, getAttributes, getChildNodes, getDocumentNode, getFeature, getFirstChild, getLastChild, getNamespaceURI, getNextSibling, getNextTo, getOwnerDocument, getParentElement, getParentNode, getPrefix, getPreviousSibling, getPreviousTo, getRootNode, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isIsConnected, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, prepend, prependChild, removeChild, replaceChild, setNamespaceURI, setOwnerDocument, setOwnerDocument, setParentImpl, setPrefix, setTextContent, setUserData, visitMethods 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:
renameNodein interfaceDocument
-
createElement
Creates an instance of the element for the specified tag.- Specified by:
createElementin interfaceDocument- Parameters:
tn- The name of an element.- Returns:
- a
Elementobject.
-
createEntityReference
- Specified by:
createEntityReferencein interfaceDocument
-
createElementNS
createElementNS.
- Specified by:
createElementNSin interfaceDocument- Parameters:
nUri- aStringobject.qName- aStringobject.- Returns:
- a
Elementobject.
-
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:
getElementsByClassNamein interfaceDocument- Parameters:
classNames- aStringobject.- Returns:
- a
HTMLCollectionobject.
-
getElementsByTagName
Retrieves a collection of objects based on the specified element name.- Specified by:
getElementsByTagNamein interfaceDocument- Parameters:
tagname- Specifies the name of an element.- Returns:
- a
HTMLCollectionobject.
-
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:
getElementsByTagNameNSin interfaceDocument- Parameters:
namespaceURI- aStringobject.localName- aStringobject.- Returns:
- a
HTMLCollectionobject.
-
getFirstElementChild
Returns the first child that is an element, and null otherwise.- Specified by:
getFirstElementChildin interfaceParentNode- Returns:
- a
Elementobject.
-
getLastElementChild
Returns the last child that is an element, and null otherwise.- Specified by:
getLastElementChildin interfaceParentNode- Returns:
- a
Elementobject.
-
getChildElementCount
public int getChildElementCount()getChildElementCount.
- Specified by:
getChildElementCountin interfaceParentNode- Returns:
- a
Integerobject.
-
querySelector
Returns the first element that is a descendant of node that matches selectors.- Specified by:
querySelectorin interfaceParentNode- Parameters:
selectors- aStringobject.- Returns:
- a
Elementobject.
-
querySelectorAll
Returns all element descendants of node that match selectors.- Specified by:
querySelectorAllin interfaceParentNode- Parameters:
selector- aStringobject.- Returns:
- a
NodeListobject.
-
getDoctype
Gets an object representing the document type declaration associated with the current document.- Specified by:
getDoctypein interfaceDocument- Returns:
- a
DocumentTypeobject.
-
setDoctype
Setter for the field doctype.
- Parameters:
doctype- aDocumentTypeobject.
-
getDocumentElement
Gets a reference to the root node of the document.- Specified by:
getDocumentElementin interfaceDocument- Returns:
- a
Elementobject.
-
createTextNode
Creates a text string from the specified value.- Specified by:
createTextNodein interfaceDocument- Parameters:
data- String that specifies the nodeValue property of the text node.- Returns:
- a
Textobject.
-
createAttribute
Creates an attribute object with a specified name.- Specified by:
createAttributein interfaceDocument- Parameters:
name- String that sets the attribute object's name.- Returns:
- a
Attrobject.
-
createAttributeNS
createAttributeNS.
- Specified by:
createAttributeNSin interfaceDocument- Parameters:
nUri- aStringobject.qName- aStringobject.- Returns:
- a
Attrobject. - Throws:
DOMException
-
createCDATASection
Returns a CDATASection node whose data is data.- Specified by:
createCDATASectionin interfaceDocument- Parameters:
data- aStringobject.- Returns:
- a
CDATASectionobject.
-
createComment
Creates a comment object with the specified data.- Specified by:
createCommentin interfaceDocument- Parameters:
data- Sets the comment object's data.- Returns:
- a
Commentobject.
-
createDocumentFragment
Creates a new document.- Specified by:
createDocumentFragmentin interfaceDocument- Returns:
- a
DocumentFragmentobject.
-
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:
createProcessingInstructionin interfaceDocument- Parameters:
target- aStringobject.data- aStringobject.- Returns:
- a
ProcessingInstructionobject.
-
getDomConfig
getDomConfig.
- Specified by:
getDomConfigin interfaceDocument- Returns:
- a
DOMConfigurationobject.
-
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:
getElementByIdin interfaceDocument- Specified by:
getElementByIdin interfaceNonElementParentNode- Parameters:
elementId- aStringobject.- Returns:
- a
Elementobject.
-
getImplementation
Gets the implementation object of the current document.- Specified by:
getImplementationin interfaceDocument- Returns:
- a
DOMImplementationobject.
-
getDocumentURI
Returns document's URL.- Specified by:
getDocumentURIin interfaceDocument- Returns:
- a
Stringobject.
-
getBaseURI
Returns node's node document's document base URL.- Specified by:
getBaseURIin interfaceNode- Overrides:
getBaseURIin classNodeImpl- Returns:
- a
Stringobject.
-
setDocumentURI
setDocumentURI.
- Specified by:
setDocumentURIin interfaceDocument- Parameters:
documentURI- aStringobject.
-
getInputEncoding
Returns the character encoding used to create the webpage that is loaded into the document object.- Specified by:
getInputEncodingin interfaceDocument- Returns:
- a
Stringobject.
-
getXmlEncoding
getXmlEncoding.
- Specified by:
getXmlEncodingin interfaceDocument- Returns:
- a
Stringobject.
-
normalizeDocument
public void normalizeDocument()normalizeDocument.
- Specified by:
normalizeDocumentin interfaceDocument
-
getStrictErrorChecking
public boolean getStrictErrorChecking()getStrictErrorChecking.
- Specified by:
getStrictErrorCheckingin interfaceDocument- Returns:
- a boolean.
-
setStrictErrorChecking
public void setStrictErrorChecking(boolean strictErrorChecking) setStrictErrorChecking.
- Specified by:
setStrictErrorCheckingin interfaceDocument- Parameters:
strictErrorChecking- a boolean.
-
getXmlStandalone
public boolean getXmlStandalone()getXmlStandalone.
- Specified by:
getXmlStandalonein interfaceDocument- Returns:
- a boolean.
-
getXmlVersion
getXmlVersion.
- Specified by:
getXmlVersionin interfaceDocument- Returns:
- a
Stringobject.
-
setXmlStandalone
public void setXmlStandalone(boolean xmlStandalone) setXmlStandalone.
- Specified by:
setXmlStandalonein interfaceDocument- Parameters:
xmlStandalone- a boolean.
-
setXmlVersion
setXmlVersion.
- Specified by:
setXmlVersionin interfaceDocument- Parameters:
xmlVersion- aStringobject.
-
createEvent
createEvent.
- Specified by:
createEventin interfaceDocument- Parameters:
eventType- aStringobject.- Returns:
- a
Eventobject. - 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:
createExpressionin 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:
createNSResolverin interfaceDocument- Specified by:
createNSResolverin interfaceXPathEvaluator- Parameters:
nodeResolver- aNodeobject.- Returns:
- a
XPathNSResolverobject.
-
evaluate
public XPathResult evaluate(String expression, Node contextNode, XPathNSResolver resolver, short type, Object result) evaluate.
- Specified by:
evaluatein interfaceDocument- Specified by:
evaluatein interfaceXPathEvaluator- Parameters:
expression- aStringobject.contextNode- aNodeobject.resolver- aXPathNSResolverobject.type- a short.result- aObjectobject.- Returns:
- a
XPathResultobject.
-
createExpression
createExpression.
- Specified by:
createExpressionin interfaceDocument- Returns:
- a
XPathExpressionobject.
-
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:
getActiveElementin interfaceDocument- Returns:
- a
Elementobject.
-
getBgColor
Deprecated. Sets or retrieves a value that indicates the background color behind the object.- Specified by:
getBgColorin interfaceDocument- Returns:
- a
Stringobject.
-
setBgColor
setBgColor.
- Specified by:
setBgColorin interfaceDocument- Parameters:
bgColor- aStringobject.
-
getCharacterSet
Returns document's encoding.- Specified by:
getCharacterSetin interfaceDocument- Returns:
- a
Stringobject.
-
getCharset
Gets or sets the character set used to encode the object.- Specified by:
getCharsetin interfaceDocument- Returns:
- a
Stringobject.
-
getCompatMode
Gets a value that indicates whether standards-compliant mode is switched on for the object.- Specified by:
getCompatModein interfaceDocument- Returns:
- a
Stringobject.
-
getContentType
Returns document's content type.- Specified by:
getContentTypein interfaceDocument- Returns:
- a
Stringobject.
-
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:
getCurrentScriptin interfaceDocument- Returns:
- a
HTMLScriptElementobject.
-
getDefaultView
getDefaultView.
- Specified by:
getDefaultViewin interfaceDocument- Returns:
- a
Windowobject.
-
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:
getDesignModein interfaceDocument- Returns:
- a
Stringobject.
-
setDesignMode
setDesignMode.
- Specified by:
setDesignModein interfaceDocument- Parameters:
designMode- aStringobject.
-
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:
getFgColorin interfaceDocument- Returns:
- a
Stringobject.
-
setFgColor
setFgColor.
- Specified by:
setFgColorin interfaceDocument- Parameters:
fgColor- aStringobject.
-
isFullscreen
public boolean isFullscreen()isFullscreen.
- Specified by:
isFullscreenin 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:
isFullscreenEnabledin interfaceDocument- Returns:
- a boolean.
-
isHidden
public boolean isHidden()isHidden.
-
getHead
Returns the head element.- Specified by:
getHeadin interfaceDocument- Returns:
- a
HTMLHeadElementobject.
-
getBody
Specifies the beginning and end of the document body.- Specified by:
getBodyin interfaceDocument- Returns:
- a
HTMLElementobject.
-
setBody
setBody.
- Specified by:
setBodyin interfaceDocument- Parameters:
body- aHTMLElementobject.
-
getApplets
Retrieves a collection of all applet objects in the document.- Specified by:
getAppletsin interfaceDocument- Returns:
- a
HTMLCollectionobject.
-
getImages
Retrieves a collection, in source order, of img objects in the document.- Specified by:
getImagesin interfaceDocument- Returns:
- a
HTMLCollectionobject.
-
getLinks
Retrieves a collection of all a objects that specify the href property and all area objects in the document.- Specified by:
getLinksin interfaceDocument- Returns:
- a
HTMLCollectionobject.
-
getForms
Retrieves a collection, in source order, of all form objects in the document.- Specified by:
getFormsin interfaceDocument- Returns:
- a
HTMLCollectionobject.
-
getEmbeds
Retrieves a collection of all embed objects in the document.- Specified by:
getEmbedsin interfaceDocument- Returns:
- a
HTMLCollectionobject.
-
getPlugins
Return an HTMLCollection of the embed elements in the Document.- Specified by:
getPluginsin interfaceDocument- Returns:
- a
HTMLCollectionobject.
-
getScripts
Retrieves a collection of all script objects in the document.- Specified by:
getScriptsin interfaceDocument- Returns:
- a
HTMLCollectionobject.
-
getCommands
getCommands.
- Specified by:
getCommandsin interfaceDocument- Returns:
- a
HTMLCollectionobject.
-
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:
getAnchorsin interfaceDocument- Returns:
- a
HTMLCollectionobject.
-
getall
Returns a reference to the collection of elements contained by the object.- Specified by:
getallin interfaceDocument- Returns:
- a
HTMLAllCollectionobject.
-
getElementsByName
Gets a collection of objects based on the value of the NAME or ID attribute.- Specified by:
getElementsByNamein interfaceDocument- Parameters:
elementName- Gets a collection of objects based on the value of the NAME or ID attribute.- Returns:
- a
HTMLCollectionobject.
-
getLastModified
Gets the date that the page was last modified, if the page supplies one.- Specified by:
getLastModifiedin interfaceDocument- Returns:
- a
Stringobject.
-
getLocation
Contains information about the current URL.- Specified by:
getLocationin interfaceDocument- Returns:
- a
Locationobject.
-
setLocation
setLocation.
- Specified by:
setLocationin interfaceDocument- Parameters:
location- aLocationobject.
-
getOrigin
Returns document's origin. -
getReadyState
Retrieves a value that indicates the current state of the object.- Specified by:
getReadyStatein interfaceDocument- Returns:
- a
DocumentReadyStateobject.
-
getScrollingElement
getScrollingElement.
- Specified by:
getScrollingElementin interfaceDocument- Returns:
- a
Elementobject.
-
getTitle
Contains the title of the document. -
setTitle
setTitle.
-
getVisibilityState
getVisibilityState.
- Specified by:
getVisibilityStatein interfaceDocument- Returns:
- a
VisibilityStateobject.
-
caretRangeFromPoint
caretRangeFromPoint.
- Specified by:
caretRangeFromPointin interfaceDocument- Parameters:
x- a double.y- a double.- Returns:
- a
Rangeobject.
-
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:DocumentTraversalCreates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.- Specified by:
createNodeIteratorin interfaceDocumentTraversal- Parameters:
root- aNodeobject.- Throws:
DOMException
-
createNodeIterator
Description copied from interface:DocumentTraversalCreates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.- Specified by:
createNodeIteratorin interfaceDocumentTraversal- Parameters:
root- aNodeobject.whatToShow- aIntegerobject.- Throws:
DOMException
-
createNodeIterator
Description copied from interface:DocumentTraversalCreates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.- Specified by:
createNodeIteratorin interfaceDocumentTraversal- Parameters:
root- aNodeobject.filter- aNodeFilterobject.- Throws:
DOMException
-
createNodeIterator
public NodeIterator createNodeIterator(Node root, int whatToShow, NodeFilter filter) throws DOMException Description copied from interface:DocumentTraversalCreates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.- Specified by:
createNodeIteratorin interfaceDocumentTraversal- Parameters:
root- aNodeobject.whatToShow- aIntegerobject.filter- aNodeFilterobject.- Throws:
DOMException
-
createRange
Returns an empty range object that has both of its boundary points positioned at the beginning of the document.- Specified by:
createRangein interfaceDocumentRange- Returns:
- a
Rangeobject.
-
createTreeWalker
Description copied from interface:DocumentTraversalcreateTreeWalker.
- Specified by:
createTreeWalkerin interfaceDocumentTraversal- Parameters:
root- aNodeobject.- Throws:
DOMException
-
createTreeWalker
Description copied from interface:DocumentTraversalcreateTreeWalker.
- Specified by:
createTreeWalkerin interfaceDocumentTraversal- Parameters:
root- aNodeobject.whatToShow- aIntegerobject.- Throws:
DOMException
-
createTreeWalker
Description copied from interface:DocumentTraversalcreateTreeWalker.
- Specified by:
createTreeWalkerin interfaceDocumentTraversal- Parameters:
root- aNodeobject.filter- aNodeFilterobject.- Throws:
DOMException
-
createTreeWalker
public TreeWalker createTreeWalker(Node root, int whatToShow, NodeFilter filter) throws DOMException Description copied from interface:DocumentTraversalcreateTreeWalker.
- Specified by:
createTreeWalkerin interfaceDocumentTraversal- Parameters:
root- aNodeobject.whatToShow- aIntegerobject.filter- aNodeFilterobject.- Throws:
DOMException
-
elementFromPoint
Returns the element for the specified x coordinate and the specified y coordinate.- Specified by:
elementFromPointin interfaceDocument- Parameters:
x- The x-offsety- The y-offset- Returns:
- a
Elementobject.
-
execCommand
Executes a command on the current document, current selection, or the given range.- Specified by:
execCommandin 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:
execCommandin interfaceDocument- Parameters:
commandId- aStringobject.showUI- a boolean.- Returns:
- a boolean.
-
execCommand
execCommand.
- Specified by:
execCommandin interfaceDocument- Parameters:
commandId- aStringobject.- 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:
getSelectionin interfaceDocument- Returns:
- a
Selectionobject.
-
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:
importNodein interfaceDocument- Parameters:
importedNode- aNodeobject.deep- a boolean.- Returns:
- a
Nodeobject. - 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:
openin 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
Documentobject.
-
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:
queryCommandEnabledin 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:
queryCommandIndetermin 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:
queryCommandStatein 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:
queryCommandSupportedin 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:
queryCommandValuein interfaceDocument- Parameters:
commandId- String that specifies a command identifier.- Returns:
- a
Stringobject.
-
releaseEvents
public void releaseEvents()releaseEvents.
- Specified by:
releaseEventsin 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:NodeReturns true if element has attributes, and false otherwise.- Specified by:
hasAttributesin interfaceNode- Returns:
- a boolean.
-
isXml
public boolean isXml() -
setXml
public void setXml(boolean xml) -
getLocalName
Description copied from class:NodeImplgetLocalName.
- Specified by:
getLocalNamein interfaceNode- Specified by:
getLocalNamein classNodeImpl- Returns:
- a
Stringobject.
-
getNodeType
public int getNodeType()Description copied from class:NodeImplReturns the type of node.- Specified by:
getNodeTypein interfaceNode- Specified by:
getNodeTypein classNodeImpl- Returns:
- a
Integerobject.
-
getNodeValue
Description copied from class:NodeImplgetNodeValue.
- Specified by:
getNodeValuein interfaceNode- Specified by:
getNodeValuein classNodeImpl- Returns:
- a
Stringobject. - Throws:
DOMException
-
setNodeValue
Description copied from class:NodeImplsetNodeValue.
- Specified by:
setNodeValuein interfaceNode- Specified by:
setNodeValuein classNodeImpl- Parameters:
nodeValue- aStringobject.- Throws:
DOMException
-
getNodeName
Description copied from class:NodeImplReturns a string appropriate for the type of node.- Specified by:
getNodeNamein interfaceNode- Specified by:
getNodeNamein classNodeImpl- Returns:
- a
Stringobject.
-