Class Document
java.lang.Object
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.javascript.HtmlUnitScriptable
org.htmlunit.javascript.host.event.EventTarget
org.htmlunit.javascript.host.dom.Node
org.htmlunit.javascript.host.dom.Document
- All Implemented Interfaces:
Serializable, Cloneable, org.htmlunit.corejs.javascript.ConstProperties, org.htmlunit.corejs.javascript.debug.DebuggableObject, org.htmlunit.corejs.javascript.Scriptable, org.htmlunit.corejs.javascript.SymbolScriptable
- Direct Known Subclasses:
HTMLDocument, XMLDocument
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate org.htmlunit.corejs.javascript.ScriptableObjectprivate Stringprivate intprivate Stringhttps://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla#Executing_Commandsprivate FontFaceSetprivate DOMImplementationprivate static final StringThe format to use for thelastModifiedattribute.private Stringprivate static final org.apache.commons.logging.Logprivate StyleSheetListContains all supported DOM level 2 events.Contains all supported DOM level 3 events.Contains all supported vendor specific events.private static final Patternprivate WindowFields inherited from class 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, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODEFields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdopts a node from an external document.voidcaptureEvents(String type) Does nothing special anymore.voidclear()Does...voidclose()JavaScript functionclose.booleanChecks whether the given element is contained within this object.createAttribute(String attributeName) Creates a new HTML attribute with the specified name.createCDATASection(String data) Creates a new createCDATASection.createComment(String comment) Creates a new Comment.Creates a new document fragment.createElement(String tagName) Creates a new element with the given tag name.createElementNS(String namespaceURI, String qualifiedName) Creates a new HTML element with the given tag name, and name.createEvent(String eventType) Implementation of theDocumentEventinterface'sDocumentEvent.createEvent(String)method.private static org.w3c.dom.traversal.NodeFiltercreateFilterWrapper(org.htmlunit.corejs.javascript.Scriptable filter, boolean filterFunctionOnly) createNodeIterator(Node root, int whatToShow, org.htmlunit.corejs.javascript.Scriptable filter) Returns a new NodeIterator object.createNSResolver(Node nodeResolver) Adapts any DOM node to resolve namespaces so that an XPath expression can be easily evaluated relative to the context of the node where it appeared within the document.createProcessingInstruction(String target, String data) Creates a new ProcessingInstruction.Creates and returns a new range.createTextNode(String newData) Create a new DOM text node with the given data.createTreeWalker(Node root, double whatToShow, org.htmlunit.corejs.javascript.Scriptable filter, boolean expandEntityReferences) Creates and returns a new TreeWalker.elementFromPoint(int x, int y) Returns the element for the specified x coordinate and the specified y coordinate.Evaluates an XPath expression string and returns a result of the specified type if possible.booleanexecCommand(String cmd, boolean userInterface, Object value) Executes a command.voidforceDocumentMode(int documentMode) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Called from the HTMLParser if a 'X-UA-Compatible' meta tag found.generateBlobUrl(Blob blob) Generate and return the URL for the given blob.Returns the value of theactiveElementproperty.Returns the value of thealinkColorproperty.getAll()Returns the value of theallproperty.Returns the value of the JavaScript propertyanchors.Returns the value of the JavaScript propertyapplets.Returns the value of thebgColorproperty.getBody()Returns this document'sbodyelement.Returns the character encoding of the current document.Retrieves the character set used to encode the document.intReturns the current number of child elements.Gets the children of the current node.Returns thecompatModeproperty.Returns thecontentTypeproperty.Returns thecookieproperty.org.htmlunit.corejs.javascript.ScriptableObjectGets the window in which this document is contained.Returns a value which indicates whether or not the document can be edited.Gets the JavaScript propertydoctypefor the document.Gets the JavaScript propertydocumentElementfor the document.intReturns thedocumentModeproperty.Returns the value of thedocumentURIproperty.Returns the domain name of the server that served the document, ornullif the server cannot be identified by a domain name.getElementById(String id) Returns the element with the specified ID, as long as it is an HTML element;nullotherwise.getElementsByClassName(String className) Returns all the descendant elements with the specified class name.getElementsByName(String elementName) Returns all HTML elements that have anameattribute with the specified value.getElementsByTagName(String tagName) Returns all the descendant elements with the specified tag name.getElementsByTagNameNS(Object namespaceURI, String localName) Returns a list of elements with the given tag name belonging to the given namespace.Returns the value of theembedsproperty.Returns the value of thefgColorproperty.Returns the first element child.org.htmlunit.corejs.javascript.ScriptableObjectgetFonts()getForms()Returns the value of theformsproperty.getHead()Returns this document'sheadelement.booleanReturns thehiddenproperty.Returns the value of theembedsproperty.Returns the implementation object of the current document.Returns a string representing the encoding under which the document was parsed.Returns the last element child.Returns the last modification date of the document.Returns the value of thelinkColorproperty.getLinks()Returns the value of the JavaScript propertylinks.Returns the value of thelocationproperty.org.htmlunit.corejs.javascript.FunctionReturns theonabortevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonafterscriptexecuteevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonauxclickevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonbeforecopyevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonbeforecutevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonbeforepasteevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonbeforescriptexecuteevent handler for this element.Returns theonblurevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theoncancelevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theoncanplayevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theoncanplaythroughevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonchangeevent handler for this element.Returns theonclickevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theoncloseevent handler for this element.Returns theoncontextmenuevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theoncopyevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theoncuechangeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOncut()Returns theoncutevent handler for this element.Returns theondblclickevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theondragevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theondragendevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theondragenterevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theondragleaveevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theondragoverevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theondragstartevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theondropevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theondurationchangeevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonemptiedevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonendedevent handler for this element.Returns theonerrorevent handler for this element.Returns theonfocusevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theongotpointercaptureevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theoninputevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theoninvalidevent handler for this element.Returns theonkeydownevent handler for this element.Returns theonkeypressevent handler for this element.Returns theonkeyupevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonloadevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonloadeddataevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonloadedmetadataevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonloadstartevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonlostpointercaptureevent handler for this element.Returns theonmousedownevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonmouseenterevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonmouseleaveevent handler for this element.Returns theonmousemoveevent handler for this element.Returns theonmouseoutevent handler for this element.Returns theonmouseoverevent handler for this element.Returns theonmouseupevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonmousewheelevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonmozfullscreenchangeevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonmozfullscreenerrorevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpasteevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpauseevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonplayevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonplayingevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpointercancelevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpointerdownevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpointerenterevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpointerleaveevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpointerlockchangeevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpointerlockerrorevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpointermoveevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpointeroutevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpointeroverevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonpointerupevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonprogressevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonratechangeevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonreadystatechangeevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonresetevent handler for this element.Returns theonresizeevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonscrollevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonsearchevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonseekedevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonseekingevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonselectevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonselectionchangeevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonselectstartevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonstalledevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonsubmitevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonsuspendevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theontimeupdateevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theontoggleevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonvolumechangeevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonwaitingevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonwebkitfullscreenchangeevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonwebkitfullscreenerrorevent handler for this element.org.htmlunit.corejs.javascript.FunctionReturns theonwheelevent handler for this element.getPage()Returns the page that this document is modeling.Returns the value of thepluginsproperty.Returns the ready state of the document.Returns the value of thereferrerproperty.Gets the JavaScript propertyrootElement.Returns the value of thescriptsproperty.Returns the current selection.Retrieves a collection of stylesheet objects representing the style sheets that correspond to each instance of a Link orCSSStyleDeclarationobject in the document.getTitle()Returns this document's title.Returns the value of theURLproperty.Returns the value of thevlinkColorproperty.Returns thexmlEncodingproperty.Returns thexmlVersionproperty.private booleanhasCommand(String cmd, boolean includeBold) booleanhasFocus()Returnsfalseif the active element in the document has no focus;trueif the active element in the document has focus.importNode(Node importedNode, boolean deep) Imports a node from another document to this document.private booleanbooleanReturns thexmlStandaloneproperty.voidJavaScript constructor.private static DateparseDateOrNow(String stringDate) booleanIndicates if the command can be successfully executed usingexecCommand, given the current state of the document.booleanIndicates if the command is supported.querySelector(String selectors) Returns the first element within the document that matches the specified group of selectors.querySelectorAll(String selectors) Retrieves all element nodes from descendants of the starting element node that match any selector within the supplied selector strings.voidMock for the moment.voidreleaseEvents(String type) Does nothing special anymore.resolveBlobUrl(String url) voidrevokeBlobUrl(String url) Revokes the URL for the given blob.voidsetAlinkColor(String color) Sets the value of thealinkColorproperty.voidsetBgColor(String color) Sets the value of thebgColorproperty.voidsetBody(HTMLElement htmlElement) Sets thebodyelement of the document.voidsetCurrentScript(org.htmlunit.corejs.javascript.ScriptableObject script) voidsetDesignMode(String mode) Sets a value which indicates whether or not the document can be edited.voidSets the domain of this document.voidsetFgColor(String color) Sets the value of thefgColorproperty.voidsetLinkColor(String color) Sets the value of thelinkColorproperty.voidsetLocation(String location) Sets the value of thelocationproperty.voidsetOnabort(Object onabort) Sets theonabortevent handler for this element.voidsetOnafterscriptexecute(Object onafterscriptexecute) Sets theonafterscriptexecuteevent handler for this element.voidsetOnauxclick(Object onauxclick) Sets theonauxclickevent handler for this element.voidsetOnbeforecopy(Object onbeforecopy) Sets theonbeforecopyevent handler for this element.voidsetOnbeforecut(Object onbeforecut) Sets theonbeforecutevent handler for this element.voidsetOnbeforepaste(Object onbeforepaste) Sets theonbeforepasteevent handler for this element.voidsetOnbeforescriptexecute(Object onbeforescriptexecute) Sets theonbeforescriptexecuteevent handler for this element.voidSets theonblurevent handler for this element.voidsetOncancel(Object oncancel) Sets theoncancelevent handler for this element.voidsetOncanplay(Object oncanplay) Sets theoncanplayevent handler for this element.voidsetOncanplaythrough(Object oncanplaythrough) Sets theoncanplaythroughevent handler for this element.voidsetOnchange(Object onchange) Sets theonchangeevent handler for this element.voidsetOnclick(Object handler) Sets theonclickevent handler for this element.voidsetOnclose(Object onclose) Sets theoncloseevent handler for this element.voidsetOncontextmenu(Object handler) Sets theoncontextmenuevent handler for this element.voidSets theoncopyevent handler for this element.voidsetOncuechange(Object oncuechange) Sets theoncuechangeevent handler for this element.voidSets theoncutevent handler for this element.voidsetOndblclick(Object handler) Sets theondblclickevent handler for this element.voidSets theondragevent handler for this element.voidsetOndragend(Object ondragend) Sets theondragendevent handler for this element.voidsetOndragenter(Object ondragenter) Sets theondragenterevent handler for this element.voidsetOndragleave(Object ondragleave) Sets theondragleaveevent handler for this element.voidsetOndragover(Object ondragover) Sets theondragoverevent handler for this element.voidsetOndragstart(Object ondragstart) Sets theondragstartevent handler for this element.voidSets theondropevent handler for this element.voidsetOndurationchange(Object ondurationchange) Sets theondurationchangeevent handler for this element.voidsetOnemptied(Object onemptied) Sets theonemptiedevent handler for this element.voidsetOnended(Object onended) Sets theonendedevent handler for this element.voidsetOnerror(Object handler) Sets theonerrorevent handler for this element.voidsetOnfocus(Object handler) Sets theonfocusevent handler for this element.voidsetOngotpointercapture(Object ongotpointercapture) Sets theongotpointercaptureevent handler for this element.voidsetOninput(Object oninput) Sets theoninputevent handler for this element.voidsetOninvalid(Object oninvalid) Sets theoninvalidevent handler for this element.voidsetOnkeydown(Object handler) Sets theonkeydownevent handler for this element.voidsetOnkeypress(Object handler) Sets theonkeypressevent handler for this element.voidsetOnkeyup(Object handler) Sets theonkeyupevent handler for this element.voidSets theonloadevent handler for this element.voidsetOnloadeddata(Object onloadeddata) Sets theonloadeddataevent handler for this element.voidsetOnloadedmetadata(Object onloadedmetadata) Sets theonloadedmetadataevent handler for this element.voidsetOnloadstart(Object onloadstart) Sets theonloadstartevent handler for this element.voidsetOnlostpointercapture(Object onlostpointercapture) Sets theonlostpointercaptureevent handler for this element.voidsetOnmousedown(Object handler) Sets theonmousedownevent handler for this element.voidsetOnmouseenter(Object onmouseenter) Sets theonmouseenterevent handler for this element.voidsetOnmouseleave(Object onmouseleave) Sets theonmouseleaveevent handler for this element.voidsetOnmousemove(Object handler) Sets theonmousemoveevent handler for this element.voidsetOnmouseout(Object handler) Sets theonmouseoutevent handler for this element.voidsetOnmouseover(Object handler) Sets theonmouseoverevent handler for this element.voidsetOnmouseup(Object handler) Sets theonmouseupevent handler for this element.voidsetOnmousewheel(Object onmousewheel) Sets theonmousewheelevent handler for this element.voidsetOnmozfullscreenchange(Object onmozfullscreenchange) Sets theonmozfullscreenchangeevent handler for this element.voidsetOnmozfullscreenerror(Object onmozfullscreenerror) Sets theonmozfullscreenerrorevent handler for this element.voidsetOnpaste(Object onpaste) Sets theonpasteevent handler for this element.voidsetOnpause(Object onpause) Sets theonpauseevent handler for this element.voidSets theonplayevent handler for this element.voidsetOnplaying(Object onplaying) Sets theonplayingevent handler for this element.voidsetOnpointercancel(Object onpointercancel) Sets theonpointercancelevent handler for this element.voidsetOnpointerdown(Object onpointerdown) Sets theonpointerdownevent handler for this element.voidsetOnpointerenter(Object onpointerenter) Sets theonpointerenterevent handler for this element.voidsetOnpointerleave(Object onpointerleave) Sets theonpointerleaveevent handler for this element.voidsetOnpointerlockchange(Object onpointerlockchange) Sets theonpointerlockchangeevent handler for this element.voidsetOnpointerlockerror(Object onpointerlockerror) Sets theonpointerlockerrorevent handler for this element.voidsetOnpointermove(Object onpointermove) Sets theonpointermoveevent handler for this element.voidsetOnpointerout(Object onpointerout) Sets theonpointeroutevent handler for this element.voidsetOnpointerover(Object onpointerover) Sets theonpointeroverevent handler for this element.voidsetOnpointerup(Object onpointerup) Sets theonpointerupevent handler for this element.voidsetOnprogress(Object onprogress) Sets theonprogressevent handler for this element.voidsetOnratechange(Object onratechange) Sets theonratechangeevent handler for this element.voidsetOnreadystatechange(Object onreadystatechange) Sets theonreadystatechangeevent handler for this element.voidsetOnreset(Object onreset) Sets theonresetevent handler for this element.voidsetOnresize(Object handler) Sets theonresizeevent handler for this element.voidsetOnscroll(Object onscroll) Sets theonscrollevent handler for this element.voidsetOnsearch(Object onsearch) Sets theonsearchevent handler for this element.voidsetOnseeked(Object onseeked) Sets theonseekedevent handler for this element.voidsetOnseeking(Object onseeking) Sets theonseekingevent handler for this element.voidsetOnselect(Object onselect) Sets theonselectevent handler for this element.voidsetOnselectionchange(Object onselectionchange) Sets theonselectionchangeevent handler for this element.voidsetOnselectstart(Object onselectstart) Sets theonselectstartevent handler for this element.voidsetOnstalled(Object onstalled) Sets theonstalledevent handler for this element.voidsetOnsubmit(Object onsubmit) Sets theonsubmitevent handler for this element.voidsetOnsuspend(Object onsuspend) Sets theonsuspendevent handler for this element.voidsetOntimeupdate(Object ontimeupdate) Sets theontimeupdateevent handler for this element.voidsetOntoggle(Object ontoggle) Sets theontoggleevent handler for this element.voidsetOnvolumechange(Object onvolumechange) Sets theonvolumechangeevent handler for this element.voidsetOnwaiting(Object onwaiting) Sets theonwaitingevent handler for this element.voidsetOnwebkitfullscreenchange(Object onwebkitfullscreenchange) Sets theonwebkitfullscreenchangeevent handler for this element.voidsetOnwebkitfullscreenerror(Object onwebkitfullscreenerror) Sets theonwebkitfullscreenerrorevent handler for this element.voidsetOnwheel(Object onwheel) Sets theonwheelevent handler for this element.voidSets this document's title.voidsetVlinkColor(String color) Sets the value of thevlinkColorproperty.voidSets the Window JavaScript object that encloses this document.private static org.htmlunit.corejs.javascript.ScriptablestaticGetPrototype(Window window, Class<? extends HtmlUnitScriptable> javaScriptClass) Methods inherited from class Node
after, append, appendChild, before, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFirstChild, getJavaScriptNode, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, getRootNode, getTextContent, hasAttributes, hasChildNodes, insertBefore, insertBeforeImpl, isEqualNode, isSameNode, normalize, prepend, remove, removeChild, replaceChild, replaceChildren, replaceWith, setNodeValue, setTextContentMethods inherited from class EventTarget
addEventListener, clearEventListenersContainer, dispatchEvent, executeEventLocally, fireEvent, getEventHandler, getEventListenersContainer, hasEventHandlers, isEventHandlerOnWindow, removeEventListener, setEventHandlerMethods inherited from class HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromiseMethods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
TAG_NAME_PATTERN
-
EXECUTE_CMDS_FF
-
EXECUTE_CMDS_CHROME
-
LAST_MODIFIED_DATE_FORMAT
The format to use for thelastModifiedattribute.- See Also:
-
SUPPORTED_DOM2_EVENT_TYPE_MAP
-
SUPPORTED_DOM3_EVENT_TYPE_MAP
-
SUPPORTED_VENDOR_EVENT_TYPE_MAP
-
window_
-
implementation_
-
designMode_
-
compatMode_
-
documentMode_
private int documentMode_ -
domain_
-
lastModified_
-
currentScript_
private org.htmlunit.corejs.javascript.ScriptableObject currentScript_ -
fonts_
-
styleSheetList_
-
blobUrl2Blobs_
-
-
Constructor Details
-
Document
public Document()Creates an instance.
-
-
Method Details
-
jsConstructor
-
setWindow
Sets the Window JavaScript object that encloses this document.- Parameters:
window- the Window JavaScript object that encloses this document
-
getLocation
Returns the value of thelocationproperty.- Returns:
- the value of the
locationproperty
-
setLocation
Sets the value of thelocationproperty. The location's default property is "href", so setting "document.location='http://www.sf.net'" is equivalent to setting "document.location.href='http://www.sf.net'".- Parameters:
location- the location to navigate to- Throws:
IOException- when location loading fails- See Also:
-
getReferrer
Returns the value of thereferrerproperty.- Returns:
- the value of the
referrerproperty
-
getDocumentElement
Gets the JavaScript propertydocumentElementfor the document.- Returns:
- the root node for the document
-
getRootElement
Gets the JavaScript propertyrootElement.- Returns:
- the root node for the document
-
getDoctype
Gets the JavaScript propertydoctypefor the document.- Returns:
- the DocumentType of the document
-
getDesignMode
Returns a value which indicates whether or not the document can be edited.- Returns:
- a value which indicates whether or not the document can be edited
-
setDesignMode
Sets a value which indicates whether or not the document can be edited.- Parameters:
mode- a value which indicates whether or not the document can be edited
-
getPage
Returns the page that this document is modeling.- Returns:
- the page that this document is modeling
-
getDefaultView
Gets the window in which this document is contained.- Returns:
- the window
-
createDocumentFragment
Creates a new document fragment.- Returns:
- a newly created document fragment
-
createAttribute
-
importNode
Imports a node from another document to this document. The source node is not altered or removed from the original document; this method creates a new copy of the source node.- Parameters:
importedNode- the node to importdeep- Whether to recursively import the subtree under the specified node; or not- Returns:
- the imported node that belongs to this Document
-
adoptNode
Adopts a node from an external document. The node and its subtree is removed from the document it's in (if any), and its ownerDocument is changed to the current document. The node can then be inserted into the current document.- Parameters:
externalNode- the node from another document to be adopted- Returns:
- the adopted node that can be used in the current document
-
getImplementation
Returns the implementation object of the current document.- Returns:
- implementation-specific object
-
createNSResolver
Adapts any DOM node to resolve namespaces so that an XPath expression can be easily evaluated relative to the context of the node where it appeared within the document.- Parameters:
nodeResolver- the node to be used as a context for namespace resolution- Returns:
- an XPathNSResolver which resolves namespaces with respect to the definitions in scope for a specified node
-
createTextNode
-
createComment
-
evaluate
public XPathResult evaluate(String expression, Node contextNode, Object resolver, int type, Object result) Evaluates an XPath expression string and returns a result of the specified type if possible.- Parameters:
expression- the XPath expression string to be parsed and evaluatedcontextNode- the context node for the evaluation of this XPath expressionresolver- the resolver permits translation of all prefixes, including the XML namespace prefix, within the XPath expression into appropriate namespace URIs.type- If a specific type is specified, then the result will be returned as the corresponding typeresult- the result object which may be reused and returned by this method- Returns:
- the result of the evaluation of the XPath expression
-
createElement
-
createElementNS
Creates a new HTML element with the given tag name, and name.- Parameters:
namespaceURI- the URI that identifies an XML namespacequalifiedName- the qualified name of the element type to instantiate- Returns:
- the new HTML element, or NOT_FOUND if the tag is not supported
-
getElementsByTagName
Returns all the descendant elements with the specified tag name.- Parameters:
tagName- the name to search for- Returns:
- all the descendant elements with the specified tag name
-
getElementsByTagNameNS
Returns a list of elements with the given tag name belonging to the given namespace.- Parameters:
namespaceURI- the namespace URI of elements to look forlocalName- is either the local name of elements to look for or the special value "*", which matches all elements.- Returns:
- a live NodeList of found elements in the order they appear in the tree
-
getActiveElement
Returns the value of theactiveElementproperty.- Returns:
- the value of the
activeElementproperty - See Also:
-
getCharacterSet
Returns the character encoding of the current document.- Returns:
- the character encoding of the current document
-
getCharset
Retrieves the character set used to encode the document.- Returns:
- the character set used to encode the document
-
getAnchors
Returns the value of the JavaScript propertyanchors.- Returns:
- the value of this property
- See Also:
-
getApplets
Returns the value of the JavaScript propertyapplets.- Returns:
- the value of this property
- See Also:
-
getBody
Returns this document'sbodyelement.- Returns:
- this document's
bodyelement
-
setBody
Sets thebodyelement of the document.- Parameters:
htmlElement- the new html element
-
close
JavaScript functionclose.See http://www.whatwg.org/specs/web-apps/current-work/multipage/section-dynamic.html for a good description of the semantics of open(), write(), writeln() and close().
- Throws:
IOException- if an IO problem occurs
-
getCompatMode
-
getDocumentMode
public int getDocumentMode()Returns thedocumentModeproperty.- Returns:
- the
documentModeproperty
-
isQuirksDocType
private boolean isQuirksDocType() -
forceDocumentMode
public void forceDocumentMode(int documentMode) INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Called from the HTMLParser if a 'X-UA-Compatible' meta tag found.- Parameters:
documentMode- the mode forced by the meta tag
-
querySelector
-
querySelectorAll
Retrieves all element nodes from descendants of the starting element node that match any selector within the supplied selector strings. The NodeList object returned by the querySelectorAll() method must be static, not live.- Parameters:
selectors- the selectors- Returns:
- the static node list
-
queryCommandSupported
Indicates if the command is supported.- Parameters:
cmd- the command identifier- Returns:
trueif the command is supported- See Also:
-
hasCommand
-
queryCommandEnabled
Indicates if the command can be successfully executed usingexecCommand, given the current state of the document.- Parameters:
cmd- the command identifier- Returns:
trueif the command can be successfully executed
-
execCommand
Executes a command.- Parameters:
cmd- the command identifieruserInterface- display a user interface if the command supports onevalue- the string, number, or other value to assign (possible values depend on the command)- Returns:
trueif the command was successful,falseotherwise- See Also:
-
getURL_js
Returns the value of theURLproperty.- Returns:
- the value of the
URLproperty
-
getDocumentURI
Returns the value of thedocumentURIproperty.- Returns:
- the value of the
documentURIproperty
-
getCookie
-
createEvent
Implementation of theDocumentEventinterface'sDocumentEvent.createEvent(String)method. The method creates an uninitialized event of the specified type.- Parameters:
eventType- the event type to create- Returns:
- an event object for the specified type
- Throws:
DOMException- if the event type is not supported (will have a type of DOMException.NOT_SUPPORTED_ERR)- See Also:
-
createNodeIterator
public NodeIterator createNodeIterator(Node root, int whatToShow, org.htmlunit.corejs.javascript.Scriptable filter) Returns a new NodeIterator object.- Parameters:
root- The root node at which to begin the NodeIterator's traversal.whatToShow- an optional long representing a bitmask created by combining the constant properties ofNodeFilterfilter- an object implementing theNodeFilterinterface- Returns:
- a new NodeIterator object
-
createFilterWrapper
private static org.w3c.dom.traversal.NodeFilter createFilterWrapper(org.htmlunit.corejs.javascript.Scriptable filter, boolean filterFunctionOnly) -
createTreeWalker
public Object createTreeWalker(Node root, double whatToShow, org.htmlunit.corejs.javascript.Scriptable filter, boolean expandEntityReferences) throws DOMException Creates and returns a new TreeWalker. The following JavaScript parameters are passed into this method:- JavaScript param 1: The root node of the TreeWalker. Must not be
null. - JavaScript param 2: Flag specifying which types of nodes appear in the logical view of the TreeWalker.
See
NodeFilterfor the set of possible Show_ values. - JavaScript param 3: The
NodeFilterto be used with this TreeWalker, ornullto indicate no filter. - JavaScript param 4: If
false, the contents of EntityReference nodes are not present in the logical view.
- Parameters:
root- the node which will serve as the root for the TreeWalkerwhatToShow- specifies which node types may appear in the logical view of the tree presentedfilter- the NodeFilter to be used with this TreeWalker, or null to indicate no filterexpandEntityReferences- If false, the contents of EntityReference nodes are not presented in the logical view- Returns:
- a new TreeWalker
- Throws:
DOMException- on attempt to create a TreeWalker with a root that isnull- See Also:
- JavaScript param 1: The root node of the TreeWalker. Must not be
-
staticGetPrototype
private static org.htmlunit.corejs.javascript.Scriptable staticGetPrototype(Window window, Class<? extends HtmlUnitScriptable> javaScriptClass) -
createRange
-
getDomain
Returns the domain name of the server that served the document, ornullif the server cannot be identified by a domain name.- Returns:
- the domain name of the server that served the document
- See Also:
-
setDomain
Sets the domain of this document.Domains can only be set to suffixes of the existing domain with the exception of setting the domain to itself.
The domain will be set according to the following rules:
- If the newDomain.equalsIgnoreCase(currentDomain) the method returns with no error.
- If the browser version is netscape, the newDomain is downshifted.
- The change will take place if and only if the suffixes of the
current domain and the new domain match AND there are at least
two domain qualifiers e.g. the following transformations are legal
d1.d2.d3.gargoylesoftware.com may be transformed to itself or:
d2.d3.gargoylesoftware.com
d3.gargoylesoftware.com
gargoylesoftware.com
transformation to: com will fail
TODO This code could be modified to understand country domain suffixes. The domain www.bbc.co.uk should be trimmable only down to bbc.co.uk trimming to co.uk should not be possible.
- Parameters:
newDomain- the new domain to set
-
setOnclick
Sets theonclickevent handler for this element.- Parameters:
handler- theonclickevent handler for this element
-
getOnclick
Returns theonclickevent handler for this element.- Returns:
- the
onclickevent handler for this element
-
setOndblclick
Sets theondblclickevent handler for this element.- Parameters:
handler- theondblclickevent handler for this element
-
getOndblclick
Returns theondblclickevent handler for this element.- Returns:
- the
ondblclickevent handler for this element
-
setOnblur
Sets theonblurevent handler for this element.- Parameters:
handler- theonblurevent handler for this element
-
getOnblur
Returns theonblurevent handler for this element.- Returns:
- the
onblurevent handler for this element
-
setOnfocus
Sets theonfocusevent handler for this element.- Parameters:
handler- theonfocusevent handler for this element
-
getOnfocus
Returns theonfocusevent handler for this element.- Returns:
- the
onfocusevent handler for this element
-
setOnkeydown
Sets theonkeydownevent handler for this element.- Parameters:
handler- theonkeydownevent handler for this element
-
getOnkeydown
Returns theonkeydownevent handler for this element.- Returns:
- the
onkeydownevent handler for this element
-
setOnkeypress
Sets theonkeypressevent handler for this element.- Parameters:
handler- theonkeypressevent handler for this element
-
getOnkeypress
Returns theonkeypressevent handler for this element.- Returns:
- the
onkeypressevent handler for this element
-
setOnkeyup
Sets theonkeyupevent handler for this element.- Parameters:
handler- theonkeyupevent handler for this element
-
getOnkeyup
Returns theonkeyupevent handler for this element.- Returns:
- the
onkeyupevent handler for this element
-
setOnmousedown
Sets theonmousedownevent handler for this element.- Parameters:
handler- theonmousedownevent handler for this element
-
getOnmousedown
Returns theonmousedownevent handler for this element.- Returns:
- the
onmousedownevent handler for this element
-
setOnmousemove
Sets theonmousemoveevent handler for this element.- Parameters:
handler- theonmousemoveevent handler for this element
-
getOnmousemove
Returns theonmousemoveevent handler for this element.- Returns:
- the
onmousemoveevent handler for this element
-
setOnmouseout
Sets theonmouseoutevent handler for this element.- Parameters:
handler- theonmouseoutevent handler for this element
-
getOnmouseout
Returns theonmouseoutevent handler for this element.- Returns:
- the
onmouseoutevent handler for this element
-
setOnmouseover
Sets theonmouseoverevent handler for this element.- Parameters:
handler- theonmouseoverevent handler for this element
-
getOnmouseover
Returns theonmouseoverevent handler for this element.- Returns:
- the
onmouseoverevent handler for this element
-
setOnmouseup
Sets theonmouseupevent handler for this element.- Parameters:
handler- theonmouseupevent handler for this element
-
getOnmouseup
Returns theonmouseupevent handler for this element.- Returns:
- the
onmouseupevent handler for this element
-
setOnresize
Sets theonresizeevent handler for this element.- Parameters:
handler- theonresizeevent handler for this element
-
getOnresize
Returns theonresizeevent handler for this element.- Returns:
- the
onresizeevent handler for this element
-
setOnerror
Sets theonerrorevent handler for this element.- Parameters:
handler- theonerrorevent handler for this element
-
getOnerror
Returns theonerrorevent handler for this element.- Returns:
- the
onerrorevent handler for this element
-
getOninput
public org.htmlunit.corejs.javascript.Function getOninput()Returns theoninputevent handler for this element.- Returns:
- the
oninputevent handler for this element
-
setOninput
Sets theoninputevent handler for this element.- Parameters:
oninput- theoninputevent handler for this element
-
getHidden
public boolean getHidden()Returns thehiddenproperty.- Returns:
- the
hiddenproperty
-
getChildElementCount
public int getChildElementCount()Returns the current number of child elements.- Overrides:
getChildElementCountin classNode- Returns:
- the child element count
-
elementFromPoint
Returns the element for the specified x coordinate and the specified y coordinate. The current implementation always returns the <body> element.- Parameters:
x- the x offset, in pixelsy- the y offset, in pixels- Returns:
- the element for the specified x coordinate and the specified y coordinate
-
getForms
Returns the value of theformsproperty.- Returns:
- the value of the
formsproperty
-
getEmbeds
Returns the value of theembedsproperty.- Returns:
- the value of the
embedsproperty
-
getImages
Returns the value of theembedsproperty.- Returns:
- the value of the
embedsproperty
-
getScripts
Returns the value of thescriptsproperty.- Returns:
- the value of the
scriptsproperty
-
getStyleSheets
Retrieves a collection of stylesheet objects representing the style sheets that correspond to each instance of a Link orCSSStyleDeclarationobject in the document.- Returns:
- styleSheet collection
-
getPlugins
Returns the value of thepluginsproperty.- Returns:
- the value of the
pluginsproperty
-
getLinks
Returns the value of the JavaScript propertylinks. Refer also to the MSDN documentation.- Returns:
- the value of this property
-
getElementsByClassName
Returns all the descendant elements with the specified class name.- Parameters:
className- the name to search for- Returns:
- all the descendant elements with the specified class name
- See Also:
-
getElementsByName
Returns all HTML elements that have anameattribute with the specified value.Refer to The DOM spec for details.
- Parameters:
elementName- - value of thenameattribute to look for- Returns:
- all HTML elements that have a
nameattribute with the specified value
-
hasFocus
public boolean hasFocus()Returnsfalseif the active element in the document has no focus;trueif the active element in the document has focus.- Returns:
- whether the active element in the document has focus or not
-
getTitle
-
setTitle
-
getChildren
Gets the children of the current node.- Overrides:
getChildrenin classNode- Returns:
- the child at the given position
- See Also:
-
getContentType
-
getSelection
-
getHead
-
getInputEncoding
Returns a string representing the encoding under which the document was parsed.- Returns:
- a string representing the encoding under which the document was parsed
-
getLastModified
Returns the last modification date of the document.- Returns:
- the date as string
- See Also:
-
parseDateOrNow
-
releaseCapture
public void releaseCapture()Mock for the moment. -
getReadyState
Returns the ready state of the document.- Returns:
- the ready state of the document
- See Also:
-
captureEvents
Does nothing special anymore.- Parameters:
type- the type of events to capture- See Also:
-
releaseEvents
Does nothing special anymore.- Parameters:
type- the type of events to capture- See Also:
-
getAlinkColor
Returns the value of thealinkColorproperty.- Returns:
- the value of the
alinkColorproperty
-
setAlinkColor
Sets the value of thealinkColorproperty.- Parameters:
color- the value of thealinkColorproperty
-
getBgColor
Returns the value of thebgColorproperty.- Returns:
- the value of the
bgColorproperty - See Also:
-
setBgColor
Sets the value of thebgColorproperty.- Parameters:
color- the value of thebgColorproperty- See Also:
-
getFgColor
Returns the value of thefgColorproperty.- Returns:
- the value of the
fgColorproperty
-
setFgColor
Sets the value of thefgColorproperty.- Parameters:
color- the value of thefgColorproperty
-
getLinkColor
Returns the value of thelinkColorproperty.- Returns:
- the value of the
linkColorproperty
-
setLinkColor
Sets the value of thelinkColorproperty.- Parameters:
color- the value of thelinkColorproperty
-
getVlinkColor
Returns the value of thevlinkColorproperty.- Returns:
- the value of the
vlinkColorproperty
-
setVlinkColor
Sets the value of thevlinkColorproperty.- Parameters:
color- the value of thevlinkColorproperty
-
getLastElementChild
Returns the last element child.- Overrides:
getLastElementChildin classNode- Returns:
- the last element child
-
getFirstElementChild
Returns the first element child.- Overrides:
getFirstElementChildin classNode- Returns:
- the first element child
-
getXmlEncoding
-
isXmlStandalone
public boolean isXmlStandalone()Returns thexmlStandaloneproperty.- Returns:
- the
xmlStandaloneproperty
-
getXmlVersion
-
getOnabort
public org.htmlunit.corejs.javascript.Function getOnabort()Returns theonabortevent handler for this element.- Returns:
- the
onabortevent handler for this element
-
setOnabort
Sets theonabortevent handler for this element.- Parameters:
onabort- theonabortevent handler for this element
-
getOnauxclick
public org.htmlunit.corejs.javascript.Function getOnauxclick()Returns theonauxclickevent handler for this element.- Returns:
- the
onauxclickevent handler for this element
-
setOnauxclick
Sets theonauxclickevent handler for this element.- Parameters:
onauxclick- theonauxclickevent handler for this element
-
getOnbeforecopy
public org.htmlunit.corejs.javascript.Function getOnbeforecopy()Returns theonbeforecopyevent handler for this element.- Returns:
- the
onbeforecopyevent handler for this element
-
setOnbeforecopy
Sets theonbeforecopyevent handler for this element.- Parameters:
onbeforecopy- theonbeforecopyevent handler for this element
-
getOnbeforecut
public org.htmlunit.corejs.javascript.Function getOnbeforecut()Returns theonbeforecutevent handler for this element.- Returns:
- the
onbeforecutevent handler for this element
-
setOnbeforecut
Sets theonbeforecutevent handler for this element.- Parameters:
onbeforecut- theonbeforecutevent handler for this element
-
getOnbeforepaste
public org.htmlunit.corejs.javascript.Function getOnbeforepaste()Returns theonbeforepasteevent handler for this element.- Returns:
- the
onbeforepasteevent handler for this element
-
setOnbeforepaste
Sets theonbeforepasteevent handler for this element.- Parameters:
onbeforepaste- theonbeforepasteevent handler for this element
-
getOncancel
public org.htmlunit.corejs.javascript.Function getOncancel()Returns theoncancelevent handler for this element.- Returns:
- the
oncancelevent handler for this element
-
setOncancel
Sets theoncancelevent handler for this element.- Parameters:
oncancel- theoncancelevent handler for this element
-
getOncanplay
public org.htmlunit.corejs.javascript.Function getOncanplay()Returns theoncanplayevent handler for this element.- Returns:
- the
oncanplayevent handler for this element
-
setOncanplay
Sets theoncanplayevent handler for this element.- Parameters:
oncanplay- theoncanplayevent handler for this element
-
getOncanplaythrough
public org.htmlunit.corejs.javascript.Function getOncanplaythrough()Returns theoncanplaythroughevent handler for this element.- Returns:
- the
oncanplaythroughevent handler for this element
-
setOncanplaythrough
Sets theoncanplaythroughevent handler for this element.- Parameters:
oncanplaythrough- theoncanplaythroughevent handler for this element
-
getOnchange
public org.htmlunit.corejs.javascript.Function getOnchange()Returns theonchangeevent handler for this element.- Returns:
- the
onchangeevent handler for this element
-
setOnchange
Sets theonchangeevent handler for this element.- Parameters:
onchange- theonchangeevent handler for this element
-
getOnclose
public org.htmlunit.corejs.javascript.Function getOnclose()Returns theoncloseevent handler for this element.- Returns:
- the
oncloseevent handler for this element
-
setOnclose
Sets theoncloseevent handler for this element.- Parameters:
onclose- theoncloseevent handler for this element
-
getOncopy
public org.htmlunit.corejs.javascript.Function getOncopy()Returns theoncopyevent handler for this element.- Returns:
- the
oncopyevent handler for this element
-
setOncopy
Sets theoncopyevent handler for this element.- Parameters:
oncopy- theoncopyevent handler for this element
-
getOncuechange
public org.htmlunit.corejs.javascript.Function getOncuechange()Returns theoncuechangeevent handler for this element.- Returns:
- the
oncuechangeevent handler for this element
-
setOncuechange
Sets theoncuechangeevent handler for this element.- Parameters:
oncuechange- theoncuechangeevent handler for this element
-
getOncut
public org.htmlunit.corejs.javascript.Function getOncut()Returns theoncutevent handler for this element.- Returns:
- the
oncutevent handler for this element
-
setOncut
Sets theoncutevent handler for this element.- Parameters:
oncut- theoncutevent handler for this element
-
getOndrag
public org.htmlunit.corejs.javascript.Function getOndrag()Returns theondragevent handler for this element.- Returns:
- the
ondragevent handler for this element
-
setOndrag
Sets theondragevent handler for this element.- Parameters:
ondrag- theondragevent handler for this element
-
getOndragend
public org.htmlunit.corejs.javascript.Function getOndragend()Returns theondragendevent handler for this element.- Returns:
- the
ondragendevent handler for this element
-
setOndragend
Sets theondragendevent handler for this element.- Parameters:
ondragend- theondragendevent handler for this element
-
getOndragenter
public org.htmlunit.corejs.javascript.Function getOndragenter()Returns theondragenterevent handler for this element.- Returns:
- the
ondragenterevent handler for this element
-
setOndragenter
Sets theondragenterevent handler for this element.- Parameters:
ondragenter- theondragenterevent handler for this element
-
getOndragleave
public org.htmlunit.corejs.javascript.Function getOndragleave()Returns theondragleaveevent handler for this element.- Returns:
- the
ondragleaveevent handler for this element
-
setOndragleave
Sets theondragleaveevent handler for this element.- Parameters:
ondragleave- theondragleaveevent handler for this element
-
getOndragover
public org.htmlunit.corejs.javascript.Function getOndragover()Returns theondragoverevent handler for this element.- Returns:
- the
ondragoverevent handler for this element
-
setOndragover
Sets theondragoverevent handler for this element.- Parameters:
ondragover- theondragoverevent handler for this element
-
getOndragstart
public org.htmlunit.corejs.javascript.Function getOndragstart()Returns theondragstartevent handler for this element.- Returns:
- the
ondragstartevent handler for this element
-
setOndragstart
Sets theondragstartevent handler for this element.- Parameters:
ondragstart- theondragstartevent handler for this element
-
getOndrop
public org.htmlunit.corejs.javascript.Function getOndrop()Returns theondropevent handler for this element.- Returns:
- the
ondropevent handler for this element
-
setOndrop
Sets theondropevent handler for this element.- Parameters:
ondrop- theondropevent handler for this element
-
getOndurationchange
public org.htmlunit.corejs.javascript.Function getOndurationchange()Returns theondurationchangeevent handler for this element.- Returns:
- the
ondurationchangeevent handler for this element
-
setOndurationchange
Sets theondurationchangeevent handler for this element.- Parameters:
ondurationchange- theondurationchangeevent handler for this element
-
getOnemptied
public org.htmlunit.corejs.javascript.Function getOnemptied()Returns theonemptiedevent handler for this element.- Returns:
- the
onemptiedevent handler for this element
-
setOnemptied
Sets theonemptiedevent handler for this element.- Parameters:
onemptied- theonemptiedevent handler for this element
-
getOnended
public org.htmlunit.corejs.javascript.Function getOnended()Returns theonendedevent handler for this element.- Returns:
- the
onendedevent handler for this element
-
setOnended
Sets theonendedevent handler for this element.- Parameters:
onended- theonendedevent handler for this element
-
getOngotpointercapture
public org.htmlunit.corejs.javascript.Function getOngotpointercapture()Returns theongotpointercaptureevent handler for this element.- Returns:
- the
ongotpointercaptureevent handler for this element
-
setOngotpointercapture
Sets theongotpointercaptureevent handler for this element.- Parameters:
ongotpointercapture- theongotpointercaptureevent handler for this element
-
getOninvalid
public org.htmlunit.corejs.javascript.Function getOninvalid()Returns theoninvalidevent handler for this element.- Returns:
- the
oninvalidevent handler for this element
-
setOninvalid
Sets theoninvalidevent handler for this element.- Parameters:
oninvalid- theoninvalidevent handler for this element
-
getOnload
public org.htmlunit.corejs.javascript.Function getOnload()Returns theonloadevent handler for this element.- Returns:
- the
onloadevent handler for this element
-
setOnload
Sets theonloadevent handler for this element.- Parameters:
onload- theonloadevent handler for this element
-
getOnloadeddata
public org.htmlunit.corejs.javascript.Function getOnloadeddata()Returns theonloadeddataevent handler for this element.- Returns:
- the
onloadeddataevent handler for this element
-
setOnloadeddata
Sets theonloadeddataevent handler for this element.- Parameters:
onloadeddata- theonloadeddataevent handler for this element
-
getOnloadedmetadata
public org.htmlunit.corejs.javascript.Function getOnloadedmetadata()Returns theonloadedmetadataevent handler for this element.- Returns:
- the
onloadedmetadataevent handler for this element
-
setOnloadedmetadata
Sets theonloadedmetadataevent handler for this element.- Parameters:
onloadedmetadata- theonloadedmetadataevent handler for this element
-
getOnloadstart
public org.htmlunit.corejs.javascript.Function getOnloadstart()Returns theonloadstartevent handler for this element.- Returns:
- the
onloadstartevent handler for this element
-
setOnloadstart
Sets theonloadstartevent handler for this element.- Parameters:
onloadstart- theonloadstartevent handler for this element
-
getOnlostpointercapture
public org.htmlunit.corejs.javascript.Function getOnlostpointercapture()Returns theonlostpointercaptureevent handler for this element.- Returns:
- the
onlostpointercaptureevent handler for this element
-
setOnlostpointercapture
Sets theonlostpointercaptureevent handler for this element.- Parameters:
onlostpointercapture- theonlostpointercaptureevent handler for this element
-
getOnmouseenter
public org.htmlunit.corejs.javascript.Function getOnmouseenter()Returns theonmouseenterevent handler for this element.- Returns:
- the
onmouseenterevent handler for this element
-
setOnmouseenter
Sets theonmouseenterevent handler for this element.- Parameters:
onmouseenter- theonmouseenterevent handler for this element
-
getOnmouseleave
public org.htmlunit.corejs.javascript.Function getOnmouseleave()Returns theonmouseleaveevent handler for this element.- Returns:
- the
onmouseleaveevent handler for this element
-
setOnmouseleave
Sets theonmouseleaveevent handler for this element.- Parameters:
onmouseleave- theonmouseleaveevent handler for this element
-
getOnmousewheel
public org.htmlunit.corejs.javascript.Function getOnmousewheel()Returns theonmousewheelevent handler for this element.- Returns:
- the
onmousewheelevent handler for this element
-
setOnmousewheel
Sets theonmousewheelevent handler for this element.- Parameters:
onmousewheel- theonmousewheelevent handler for this element
-
getOnpaste
public org.htmlunit.corejs.javascript.Function getOnpaste()Returns theonpasteevent handler for this element.- Returns:
- the
onpasteevent handler for this element
-
setOnpaste
Sets theonpasteevent handler for this element.- Parameters:
onpaste- theonpasteevent handler for this element
-
getOnpause
public org.htmlunit.corejs.javascript.Function getOnpause()Returns theonpauseevent handler for this element.- Returns:
- the
onpauseevent handler for this element
-
setOnpause
Sets theonpauseevent handler for this element.- Parameters:
onpause- theonpauseevent handler for this element
-
getOnplay
public org.htmlunit.corejs.javascript.Function getOnplay()Returns theonplayevent handler for this element.- Returns:
- the
onplayevent handler for this element
-
setOnplay
Sets theonplayevent handler for this element.- Parameters:
onplay- theonplayevent handler for this element
-
getOnplaying
public org.htmlunit.corejs.javascript.Function getOnplaying()Returns theonplayingevent handler for this element.- Returns:
- the
onplayingevent handler for this element
-
setOnplaying
Sets theonplayingevent handler for this element.- Parameters:
onplaying- theonplayingevent handler for this element
-
getOnpointercancel
public org.htmlunit.corejs.javascript.Function getOnpointercancel()Returns theonpointercancelevent handler for this element.- Returns:
- the
onpointercancelevent handler for this element
-
setOnpointercancel
Sets theonpointercancelevent handler for this element.- Parameters:
onpointercancel- theonpointercancelevent handler for this element
-
getOnpointerdown
public org.htmlunit.corejs.javascript.Function getOnpointerdown()Returns theonpointerdownevent handler for this element.- Returns:
- the
onpointerdownevent handler for this element
-
setOnpointerdown
Sets theonpointerdownevent handler for this element.- Parameters:
onpointerdown- theonpointerdownevent handler for this element
-
getOnpointerenter
public org.htmlunit.corejs.javascript.Function getOnpointerenter()Returns theonpointerenterevent handler for this element.- Returns:
- the
onpointerenterevent handler for this element
-
setOnpointerenter
Sets theonpointerenterevent handler for this element.- Parameters:
onpointerenter- theonpointerenterevent handler for this element
-
getOnpointerleave
public org.htmlunit.corejs.javascript.Function getOnpointerleave()Returns theonpointerleaveevent handler for this element.- Returns:
- the
onpointerleaveevent handler for this element
-
setOnpointerleave
Sets theonpointerleaveevent handler for this element.- Parameters:
onpointerleave- theonpointerleaveevent handler for this element
-
getOnpointerlockchange
public org.htmlunit.corejs.javascript.Function getOnpointerlockchange()Returns theonpointerlockchangeevent handler for this element.- Returns:
- the
onpointerlockchangeevent handler for this element
-
setOnpointerlockchange
Sets theonpointerlockchangeevent handler for this element.- Parameters:
onpointerlockchange- theonpointerlockchangeevent handler for this element
-
getOnpointerlockerror
public org.htmlunit.corejs.javascript.Function getOnpointerlockerror()Returns theonpointerlockerrorevent handler for this element.- Returns:
- the
onpointerlockerrorevent handler for this element
-
setOnpointerlockerror
Sets theonpointerlockerrorevent handler for this element.- Parameters:
onpointerlockerror- theonpointerlockerrorevent handler for this element
-
getOnpointermove
public org.htmlunit.corejs.javascript.Function getOnpointermove()Returns theonpointermoveevent handler for this element.- Returns:
- the
onpointermoveevent handler for this element
-
setOnpointermove
Sets theonpointermoveevent handler for this element.- Parameters:
onpointermove- theonpointermoveevent handler for this element
-
getOnpointerout
public org.htmlunit.corejs.javascript.Function getOnpointerout()Returns theonpointeroutevent handler for this element.- Returns:
- the
onpointeroutevent handler for this element
-
setOnpointerout
Sets theonpointeroutevent handler for this element.- Parameters:
onpointerout- theonpointeroutevent handler for this element
-
getOnpointerover
public org.htmlunit.corejs.javascript.Function getOnpointerover()Returns theonpointeroverevent handler for this element.- Returns:
- the
onpointeroverevent handler for this element
-
setOnpointerover
Sets theonpointeroverevent handler for this element.- Parameters:
onpointerover- theonpointeroverevent handler for this element
-
getOnpointerup
public org.htmlunit.corejs.javascript.Function getOnpointerup()Returns theonpointerupevent handler for this element.- Returns:
- the
onpointerupevent handler for this element
-
setOnpointerup
Sets theonpointerupevent handler for this element.- Parameters:
onpointerup- theonpointerupevent handler for this element
-
getOnprogress
public org.htmlunit.corejs.javascript.Function getOnprogress()Returns theonprogressevent handler for this element.- Returns:
- the
onprogressevent handler for this element
-
setOnprogress
Sets theonprogressevent handler for this element.- Parameters:
onprogress- theonprogressevent handler for this element
-
getOnratechange
public org.htmlunit.corejs.javascript.Function getOnratechange()Returns theonratechangeevent handler for this element.- Returns:
- the
onratechangeevent handler for this element
-
setOnratechange
Sets theonratechangeevent handler for this element.- Parameters:
onratechange- theonratechangeevent handler for this element
-
getOnreadystatechange
public org.htmlunit.corejs.javascript.Function getOnreadystatechange()Returns theonreadystatechangeevent handler for this element.- Returns:
- the
onreadystatechangeevent handler for this element
-
setOnreadystatechange
Sets theonreadystatechangeevent handler for this element.- Parameters:
onreadystatechange- theonreadystatechangeevent handler for this element
-
getOnreset
public org.htmlunit.corejs.javascript.Function getOnreset()Returns theonresetevent handler for this element.- Returns:
- the
onresetevent handler for this element
-
setOnreset
Sets theonresetevent handler for this element.- Parameters:
onreset- theonresetevent handler for this element
-
getOnscroll
public org.htmlunit.corejs.javascript.Function getOnscroll()Returns theonscrollevent handler for this element.- Returns:
- the
onscrollevent handler for this element
-
setOnscroll
Sets theonscrollevent handler for this element.- Parameters:
onscroll- theonscrollevent handler for this element
-
getOnsearch
public org.htmlunit.corejs.javascript.Function getOnsearch()Returns theonsearchevent handler for this element.- Returns:
- the
onsearchevent handler for this element
-
setOnsearch
Sets theonsearchevent handler for this element.- Parameters:
onsearch- theonsearchevent handler for this element
-
getOnseeked
public org.htmlunit.corejs.javascript.Function getOnseeked()Returns theonseekedevent handler for this element.- Returns:
- the
onseekedevent handler for this element
-
setOnseeked
Sets theonseekedevent handler for this element.- Parameters:
onseeked- theonseekedevent handler for this element
-
getOnseeking
public org.htmlunit.corejs.javascript.Function getOnseeking()Returns theonseekingevent handler for this element.- Returns:
- the
onseekingevent handler for this element
-
setOnseeking
Sets theonseekingevent handler for this element.- Parameters:
onseeking- theonseekingevent handler for this element
-
getOnselect
public org.htmlunit.corejs.javascript.Function getOnselect()Returns theonselectevent handler for this element.- Returns:
- the
onselectevent handler for this element
-
setOnselect
Sets theonselectevent handler for this element.- Parameters:
onselect- theonselectevent handler for this element
-
getOnselectionchange
public org.htmlunit.corejs.javascript.Function getOnselectionchange()Returns theonselectionchangeevent handler for this element.- Returns:
- the
onselectionchangeevent handler for this element
-
setOnselectionchange
Sets theonselectionchangeevent handler for this element.- Parameters:
onselectionchange- theonselectionchangeevent handler for this element
-
getOnselectstart
public org.htmlunit.corejs.javascript.Function getOnselectstart()Returns theonselectstartevent handler for this element.- Returns:
- the
onselectstartevent handler for this element
-
setOnselectstart
Sets theonselectstartevent handler for this element.- Parameters:
onselectstart- theonselectstartevent handler for this element
-
getOnstalled
public org.htmlunit.corejs.javascript.Function getOnstalled()Returns theonstalledevent handler for this element.- Returns:
- the
onstalledevent handler for this element
-
setOnstalled
Sets theonstalledevent handler for this element.- Parameters:
onstalled- theonstalledevent handler for this element
-
getOnsubmit
public org.htmlunit.corejs.javascript.Function getOnsubmit()Returns theonsubmitevent handler for this element.- Returns:
- the
onsubmitevent handler for this element
-
setOnsubmit
Sets theonsubmitevent handler for this element.- Parameters:
onsubmit- theonsubmitevent handler for this element
-
getOnsuspend
public org.htmlunit.corejs.javascript.Function getOnsuspend()Returns theonsuspendevent handler for this element.- Returns:
- the
onsuspendevent handler for this element
-
setOnsuspend
Sets theonsuspendevent handler for this element.- Parameters:
onsuspend- theonsuspendevent handler for this element
-
getOntimeupdate
public org.htmlunit.corejs.javascript.Function getOntimeupdate()Returns theontimeupdateevent handler for this element.- Returns:
- the
ontimeupdateevent handler for this element
-
setOntimeupdate
Sets theontimeupdateevent handler for this element.- Parameters:
ontimeupdate- theontimeupdateevent handler for this element
-
getOntoggle
public org.htmlunit.corejs.javascript.Function getOntoggle()Returns theontoggleevent handler for this element.- Returns:
- the
ontoggleevent handler for this element
-
setOntoggle
Sets theontoggleevent handler for this element.- Parameters:
ontoggle- theontoggleevent handler for this element
-
getOnvolumechange
public org.htmlunit.corejs.javascript.Function getOnvolumechange()Returns theonvolumechangeevent handler for this element.- Returns:
- the
onvolumechangeevent handler for this element
-
setOnvolumechange
Sets theonvolumechangeevent handler for this element.- Parameters:
onvolumechange- theonvolumechangeevent handler for this element
-
getOnwaiting
public org.htmlunit.corejs.javascript.Function getOnwaiting()Returns theonwaitingevent handler for this element.- Returns:
- the
onwaitingevent handler for this element
-
setOnwaiting
Sets theonwaitingevent handler for this element.- Parameters:
onwaiting- theonwaitingevent handler for this element
-
getOnwebkitfullscreenchange
public org.htmlunit.corejs.javascript.Function getOnwebkitfullscreenchange()Returns theonwebkitfullscreenchangeevent handler for this element.- Returns:
- the
onwebkitfullscreenchangeevent handler for this element
-
setOnwebkitfullscreenchange
Sets theonwebkitfullscreenchangeevent handler for this element.- Parameters:
onwebkitfullscreenchange- theonwebkitfullscreenchangeevent handler for this element
-
getOnwebkitfullscreenerror
public org.htmlunit.corejs.javascript.Function getOnwebkitfullscreenerror()Returns theonwebkitfullscreenerrorevent handler for this element.- Returns:
- the
onwebkitfullscreenerrorevent handler for this element
-
setOnwebkitfullscreenerror
Sets theonwebkitfullscreenerrorevent handler for this element.- Parameters:
onwebkitfullscreenerror- theonwebkitfullscreenerrorevent handler for this element
-
getOnwheel
public org.htmlunit.corejs.javascript.Function getOnwheel()Returns theonwheelevent handler for this element.- Returns:
- the
onwheelevent handler for this element
-
setOnwheel
Sets theonwheelevent handler for this element.- Parameters:
onwheel- theonwheelevent handler for this element
-
getOnafterscriptexecute
public org.htmlunit.corejs.javascript.Function getOnafterscriptexecute()Returns theonafterscriptexecuteevent handler for this element.- Returns:
- the
onafterscriptexecuteevent handler for this element
-
setOnafterscriptexecute
Sets theonafterscriptexecuteevent handler for this element.- Parameters:
onafterscriptexecute- theonafterscriptexecuteevent handler for this element
-
getOnbeforescriptexecute
public org.htmlunit.corejs.javascript.Function getOnbeforescriptexecute()Returns theonbeforescriptexecuteevent handler for this element.- Returns:
- the
onbeforescriptexecuteevent handler for this element
-
setOnbeforescriptexecute
Sets theonbeforescriptexecuteevent handler for this element.- Parameters:
onbeforescriptexecute- theonbeforescriptexecuteevent handler for this element
-
getOnmozfullscreenchange
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenchange()Returns theonmozfullscreenchangeevent handler for this element.- Returns:
- the
onmozfullscreenchangeevent handler for this element
-
setOnmozfullscreenchange
Sets theonmozfullscreenchangeevent handler for this element.- Parameters:
onmozfullscreenchange- theonmozfullscreenchangeevent handler for this element
-
getOnmozfullscreenerror
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenerror()Returns theonmozfullscreenerrorevent handler for this element.- Returns:
- the
onmozfullscreenerrorevent handler for this element
-
setOnmozfullscreenerror
Sets theonmozfullscreenerrorevent handler for this element.- Parameters:
onmozfullscreenerror- theonmozfullscreenerrorevent handler for this element
-
getCurrentScript
public org.htmlunit.corejs.javascript.ScriptableObject getCurrentScript()- Returns:
- the
currentScript
-
setCurrentScript
public void setCurrentScript(org.htmlunit.corejs.javascript.ScriptableObject script) - Parameters:
script- thecurrentScript
-
getFonts
public org.htmlunit.corejs.javascript.ScriptableObject getFonts()- Returns:
- the
FontFaceSet
-
getAll
Returns the value of theallproperty.- Returns:
- the value of the
allproperty
-
getElementById
Returns the element with the specified ID, as long as it is an HTML element;nullotherwise.- Parameters:
id- the ID to search for- Returns:
- the element with the specified ID, as long as it is an HTML element;
nullotherwise
-
createProcessingInstruction
-
createCDATASection
-
clear
public void clear()Does... nothing.- See Also:
-
contains
-
generateBlobUrl
Generate and return the URL for the given blob.- Parameters:
blob- the Blob containing the data- Returns:
- the URL
URL.createObjectURL(Object)
-
resolveBlobUrl
-
revokeBlobUrl
Revokes the URL for the given blob.- Parameters:
url- the url to revokeURL.revokeObjectURL(Scriptable)
-