Class Document

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.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

    public class Document
    extends Node
    A JavaScript object for Document.
    See Also:
    MSDN documentation, W3C Dom Level 1, Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject

        org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
    • Constructor Summary

      Constructors 
      Constructor Description
      Document()
      Creates an instance.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object adoptNode​(Node externalNode)
      Adopts a node from an external document.
      void captureEvents​(java.lang.String type)
      Does nothing special anymore.
      void clear()
      Does...
      void close()
      JavaScript function close.
      boolean contains​(java.lang.Object element)
      Checks whether the given element is contained within this object.
      Attr createAttribute​(java.lang.String attributeName)
      Creates a new HTML attribute with the specified name.
      java.lang.Object createCDATASection​(java.lang.String data)
      Creates a new createCDATASection.
      java.lang.Object createComment​(java.lang.String comment)
      Creates a new Comment.
      java.lang.Object createDocumentFragment()
      Creates a new document fragment.
      java.lang.Object createElement​(java.lang.String tagName)
      Creates a new element with the given tag name.
      java.lang.Object createElementNS​(java.lang.String namespaceURI, java.lang.String qualifiedName)
      Creates a new HTML element with the given tag name, and name.
      Event createEvent​(java.lang.String eventType)
      Implementation of the DocumentEvent interface's DocumentEvent.createEvent(String) method.
      private static org.w3c.dom.traversal.NodeFilter createFilterWrapper​(org.htmlunit.corejs.javascript.Scriptable filter, boolean filterFunctionOnly)  
      NodeIterator createNodeIterator​(Node root, int whatToShow, org.htmlunit.corejs.javascript.Scriptable filter)
      Returns a new NodeIterator object.
      XPathNSResolver 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.
      java.lang.Object createProcessingInstruction​(java.lang.String target, java.lang.String data)
      Creates a new ProcessingInstruction.
      Range createRange()
      Creates and returns a new range.
      java.lang.Object createTextNode​(java.lang.String newData)
      Create a new DOM text node with the given data.
      java.lang.Object createTreeWalker​(Node root, double whatToShow, org.htmlunit.corejs.javascript.Scriptable filter, boolean expandEntityReferences)
      Creates and returns a new TreeWalker.
      java.lang.Object elementFromPoint​(int x, int y)
      Returns the element for the specified x coordinate and the specified y coordinate.
      XPathResult evaluate​(java.lang.String expression, Node contextNode, java.lang.Object resolver, int type, java.lang.Object result)
      Evaluates an XPath expression string and returns a result of the specified type if possible.
      boolean execCommand​(java.lang.String cmd, boolean userInterface, java.lang.Object value)
      Executes a command.
      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.
      java.lang.String generateBlobUrl​(Blob blob)
      Generate and return the URL for the given blob.
      java.lang.Object getActiveElement()
      Returns the value of the activeElement property.
      java.lang.String getAlinkColor()
      Returns the value of the alinkColor property.
      HTMLCollection getAll()
      Returns the value of the all property.
      java.lang.Object getAnchors()
      Returns the value of the JavaScript property anchors.
      java.lang.Object getApplets()
      Returns the value of the JavaScript property applets.
      java.lang.String getBgColor()
      Returns the value of the bgColor property.
      HTMLElement getBody()
      Returns this document's body element.
      java.lang.String getCharacterSet()
      Returns the character encoding of the current document.
      java.lang.String getCharset()
      Retrieves the character set used to encode the document.
      int getChildElementCount()
      Returns the current number of child elements.
      HTMLCollection getChildren()
      Gets the children of the current node.
      java.lang.String getCompatMode()
      Returns the compatMode property.
      java.lang.String getContentType()
      Returns the contentType property.
      java.lang.String getCookie()
      Returns the cookie property.
      org.htmlunit.corejs.javascript.ScriptableObject getCurrentScript()  
      java.lang.Object getDefaultView()
      Gets the window in which this document is contained.
      java.lang.String getDesignMode()
      Returns a value which indicates whether or not the document can be edited.
      HtmlUnitScriptable getDoctype()
      Gets the JavaScript property doctype for the document.
      Element getDocumentElement()
      Gets the JavaScript property documentElement for the document.
      int getDocumentMode()
      Returns the documentMode property.
      java.lang.String getDocumentURI()
      Returns the value of the documentURI property.
      java.lang.String getDomain()
      Returns the domain name of the server that served the document, or null if the server cannot be identified by a domain name.
      HtmlUnitScriptable getElementById​(java.lang.String id)
      Returns the element with the specified ID, as long as it is an HTML element; null otherwise.
      HTMLCollection getElementsByClassName​(java.lang.String className)
      Returns all the descendant elements with the specified class name.
      NodeList getElementsByName​(java.lang.String elementName)
      Returns all HTML elements that have a name attribute with the specified value.
      HTMLCollection getElementsByTagName​(java.lang.String tagName)
      Returns all the descendant elements with the specified tag name.
      java.lang.Object getElementsByTagNameNS​(java.lang.Object namespaceURI, java.lang.String localName)
      Returns a list of elements with the given tag name belonging to the given namespace.
      java.lang.Object getEmbeds()
      Returns the value of the embeds property.
      java.lang.String getFgColor()
      Returns the value of the fgColor property.
      Element getFirstElementChild()
      Returns the first element child.
      org.htmlunit.corejs.javascript.ScriptableObject getFonts()  
      java.lang.Object getForms()
      Returns the value of the forms property.
      java.lang.Object getHead()
      Returns this document's head element.
      boolean getHidden()
      Returns the hidden property.
      java.lang.Object getImages()
      Returns the value of the embeds property.
      DOMImplementation getImplementation()
      Returns the implementation object of the current document.
      java.lang.String getInputEncoding()
      Returns a string representing the encoding under which the document was parsed.
      Element getLastElementChild()
      Returns the last element child.
      java.lang.String getLastModified()
      Returns the last modification date of the document.
      java.lang.String getLinkColor()
      Returns the value of the linkColor property.
      java.lang.Object getLinks()
      Returns the value of the JavaScript property links.
      Location getLocation()
      Returns the value of the location property.
      org.htmlunit.corejs.javascript.Function getOnabort()
      Returns the onabort event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnafterscriptexecute()
      Returns the onafterscriptexecute event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnauxclick()
      Returns the onauxclick event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnbeforecopy()
      Returns the onbeforecopy event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnbeforecut()
      Returns the onbeforecut event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnbeforepaste()
      Returns the onbeforepaste event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnbeforescriptexecute()
      Returns the onbeforescriptexecute event handler for this element.
      java.lang.Object getOnblur()
      Returns the onblur event handler for this element.
      org.htmlunit.corejs.javascript.Function getOncancel()
      Returns the oncancel event handler for this element.
      org.htmlunit.corejs.javascript.Function getOncanplay()
      Returns the oncanplay event handler for this element.
      org.htmlunit.corejs.javascript.Function getOncanplaythrough()
      Returns the oncanplaythrough event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnchange()
      Returns the onchange event handler for this element.
      java.lang.Object getOnclick()
      Returns the onclick event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnclose()
      Returns the onclose event handler for this element.
      java.lang.Object getOncontextmenu()
      Returns the oncontextmenu event handler for this element.
      org.htmlunit.corejs.javascript.Function getOncopy()
      Returns the oncopy event handler for this element.
      org.htmlunit.corejs.javascript.Function getOncuechange()
      Returns the oncuechange event handler for this element.
      org.htmlunit.corejs.javascript.Function getOncut()
      Returns the oncut event handler for this element.
      java.lang.Object getOndblclick()
      Returns the ondblclick event handler for this element.
      org.htmlunit.corejs.javascript.Function getOndrag()
      Returns the ondrag event handler for this element.
      org.htmlunit.corejs.javascript.Function getOndragend()
      Returns the ondragend event handler for this element.
      org.htmlunit.corejs.javascript.Function getOndragenter()
      Returns the ondragenter event handler for this element.
      org.htmlunit.corejs.javascript.Function getOndragleave()
      Returns the ondragleave event handler for this element.
      org.htmlunit.corejs.javascript.Function getOndragover()
      Returns the ondragover event handler for this element.
      org.htmlunit.corejs.javascript.Function getOndragstart()
      Returns the ondragstart event handler for this element.
      org.htmlunit.corejs.javascript.Function getOndrop()
      Returns the ondrop event handler for this element.
      org.htmlunit.corejs.javascript.Function getOndurationchange()
      Returns the ondurationchange event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnemptied()
      Returns the onemptied event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnended()
      Returns the onended event handler for this element.
      java.lang.Object getOnerror()
      Returns the onerror event handler for this element.
      java.lang.Object getOnfocus()
      Returns the onfocus event handler for this element.
      org.htmlunit.corejs.javascript.Function getOngotpointercapture()
      Returns the ongotpointercapture event handler for this element.
      org.htmlunit.corejs.javascript.Function getOninput()
      Returns the oninput event handler for this element.
      org.htmlunit.corejs.javascript.Function getOninvalid()
      Returns the oninvalid event handler for this element.
      java.lang.Object getOnkeydown()
      Returns the onkeydown event handler for this element.
      java.lang.Object getOnkeypress()
      Returns the onkeypress event handler for this element.
      java.lang.Object getOnkeyup()
      Returns the onkeyup event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnload()
      Returns the onload event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnloadeddata()
      Returns the onloadeddata event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnloadedmetadata()
      Returns the onloadedmetadata event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnloadstart()
      Returns the onloadstart event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnlostpointercapture()
      Returns the onlostpointercapture event handler for this element.
      java.lang.Object getOnmousedown()
      Returns the onmousedown event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnmouseenter()
      Returns the onmouseenter event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnmouseleave()
      Returns the onmouseleave event handler for this element.
      java.lang.Object getOnmousemove()
      Returns the onmousemove event handler for this element.
      java.lang.Object getOnmouseout()
      Returns the onmouseout event handler for this element.
      java.lang.Object getOnmouseover()
      Returns the onmouseover event handler for this element.
      java.lang.Object getOnmouseup()
      Returns the onmouseup event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnmousewheel()
      Returns the onmousewheel event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnmozfullscreenchange()
      Returns the onmozfullscreenchange event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnmozfullscreenerror()
      Returns the onmozfullscreenerror event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpaste()
      Returns the onpaste event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpause()
      Returns the onpause event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnplay()
      Returns the onplay event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnplaying()
      Returns the onplaying event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpointercancel()
      Returns the onpointercancel event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpointerdown()
      Returns the onpointerdown event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpointerenter()
      Returns the onpointerenter event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpointerleave()
      Returns the onpointerleave event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpointerlockchange()
      Returns the onpointerlockchange event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpointerlockerror()
      Returns the onpointerlockerror event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpointermove()
      Returns the onpointermove event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpointerout()
      Returns the onpointerout event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpointerover()
      Returns the onpointerover event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnpointerup()
      Returns the onpointerup event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnprogress()
      Returns the onprogress event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnratechange()
      Returns the onratechange event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnreadystatechange()
      Returns the onreadystatechange event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnreset()
      Returns the onreset event handler for this element.
      java.lang.Object getOnresize()
      Returns the onresize event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnscroll()
      Returns the onscroll event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnsearch()
      Returns the onsearch event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnseeked()
      Returns the onseeked event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnseeking()
      Returns the onseeking event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnselect()
      Returns the onselect event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnselectionchange()
      Returns the onselectionchange event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnselectstart()
      Returns the onselectstart event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnstalled()
      Returns the onstalled event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnsubmit()
      Returns the onsubmit event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnsuspend()
      Returns the onsuspend event handler for this element.
      org.htmlunit.corejs.javascript.Function getOntimeupdate()
      Returns the ontimeupdate event handler for this element.
      org.htmlunit.corejs.javascript.Function getOntoggle()
      Returns the ontoggle event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnvolumechange()
      Returns the onvolumechange event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnwaiting()
      Returns the onwaiting event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnwebkitfullscreenchange()
      Returns the onwebkitfullscreenchange event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnwebkitfullscreenerror()
      Returns the onwebkitfullscreenerror event handler for this element.
      org.htmlunit.corejs.javascript.Function getOnwheel()
      Returns the onwheel event handler for this element.
      SgmlPage getPage()
      Returns the page that this document is modeling.
      java.lang.Object getPlugins()
      Returns the value of the plugins property.
      java.lang.String getReadyState()
      Returns the ready state of the document.
      java.lang.String getReferrer()
      Returns the value of the referrer property.
      Element getRootElement()
      Gets the JavaScript property rootElement.
      java.lang.Object getScripts()
      Returns the value of the scripts property.
      Selection getSelection()
      Returns the current selection.
      StyleSheetList getStyleSheets()
      Retrieves a collection of stylesheet objects representing the style sheets that correspond to each instance of a Link or CSSStyleDeclaration object in the document.
      java.lang.String getTitle()
      Returns this document's title.
      java.lang.String getURL_js()
      Returns the value of the URL property.
      java.lang.String getVlinkColor()
      Returns the value of the vlinkColor property.
      java.lang.String getXmlEncoding()
      Returns the xmlEncoding property.
      java.lang.String getXmlVersion()
      Returns the xmlVersion property.
      private boolean hasCommand​(java.lang.String cmd, boolean includeBold)  
      boolean hasFocus()
      Returns false if the active element in the document has no focus; true if the active element in the document has focus.
      HtmlUnitScriptable importNode​(Node importedNode, boolean deep)
      Imports a node from another document to this document.
      private boolean isQuirksDocType()  
      boolean isXmlStandalone()
      Returns the xmlStandalone property.
      void jsConstructor()
      JavaScript constructor.
      private static java.util.Date parseDateOrNow​(java.lang.String stringDate)  
      boolean queryCommandEnabled​(java.lang.String cmd)
      Indicates if the command can be successfully executed using execCommand, given the current state of the document.
      boolean queryCommandSupported​(java.lang.String cmd)
      Indicates if the command is supported.
      Node querySelector​(java.lang.String selectors)
      Returns the first element within the document that matches the specified group of selectors.
      NodeList querySelectorAll​(java.lang.String selectors)
      Retrieves all element nodes from descendants of the starting element node that match any selector within the supplied selector strings.
      void releaseCapture()
      Mock for the moment.
      void releaseEvents​(java.lang.String type)
      Does nothing special anymore.
      Blob resolveBlobUrl​(java.lang.String url)  
      void revokeBlobUrl​(java.lang.String url)
      Revokes the URL for the given blob.
      void setAlinkColor​(java.lang.String color)
      Sets the value of the alinkColor property.
      void setBgColor​(java.lang.String color)
      Sets the value of the bgColor property.
      void setBody​(HTMLElement htmlElement)
      Sets the body element of the document.
      void setCurrentScript​(org.htmlunit.corejs.javascript.ScriptableObject script)  
      void setDesignMode​(java.lang.String mode)
      Sets a value which indicates whether or not the document can be edited.
      void setDomain​(java.lang.String newDomain)
      Sets the domain of this document.
      void setFgColor​(java.lang.String color)
      Sets the value of the fgColor property.
      void setLinkColor​(java.lang.String color)
      Sets the value of the linkColor property.
      void setLocation​(java.lang.String location)
      Sets the value of the location property.
      void setOnabort​(java.lang.Object onabort)
      Sets the onabort event handler for this element.
      void setOnafterscriptexecute​(java.lang.Object onafterscriptexecute)
      Sets the onafterscriptexecute event handler for this element.
      void setOnauxclick​(java.lang.Object onauxclick)
      Sets the onauxclick event handler for this element.
      void setOnbeforecopy​(java.lang.Object onbeforecopy)
      Sets the onbeforecopy event handler for this element.
      void setOnbeforecut​(java.lang.Object onbeforecut)
      Sets the onbeforecut event handler for this element.
      void setOnbeforepaste​(java.lang.Object onbeforepaste)
      Sets the onbeforepaste event handler for this element.
      void setOnbeforescriptexecute​(java.lang.Object onbeforescriptexecute)
      Sets the onbeforescriptexecute event handler for this element.
      void setOnblur​(java.lang.Object handler)
      Sets the onblur event handler for this element.
      void setOncancel​(java.lang.Object oncancel)
      Sets the oncancel event handler for this element.
      void setOncanplay​(java.lang.Object oncanplay)
      Sets the oncanplay event handler for this element.
      void setOncanplaythrough​(java.lang.Object oncanplaythrough)
      Sets the oncanplaythrough event handler for this element.
      void setOnchange​(java.lang.Object onchange)
      Sets the onchange event handler for this element.
      void setOnclick​(java.lang.Object handler)
      Sets the onclick event handler for this element.
      void setOnclose​(java.lang.Object onclose)
      Sets the onclose event handler for this element.
      void setOncontextmenu​(java.lang.Object handler)
      Sets the oncontextmenu event handler for this element.
      void setOncopy​(java.lang.Object oncopy)
      Sets the oncopy event handler for this element.
      void setOncuechange​(java.lang.Object oncuechange)
      Sets the oncuechange event handler for this element.
      void setOncut​(java.lang.Object oncut)
      Sets the oncut event handler for this element.
      void setOndblclick​(java.lang.Object handler)
      Sets the ondblclick event handler for this element.
      void setOndrag​(java.lang.Object ondrag)
      Sets the ondrag event handler for this element.
      void setOndragend​(java.lang.Object ondragend)
      Sets the ondragend event handler for this element.
      void setOndragenter​(java.lang.Object ondragenter)
      Sets the ondragenter event handler for this element.
      void setOndragleave​(java.lang.Object ondragleave)
      Sets the ondragleave event handler for this element.
      void setOndragover​(java.lang.Object ondragover)
      Sets the ondragover event handler for this element.
      void setOndragstart​(java.lang.Object ondragstart)
      Sets the ondragstart event handler for this element.
      void setOndrop​(java.lang.Object ondrop)
      Sets the ondrop event handler for this element.
      void setOndurationchange​(java.lang.Object ondurationchange)
      Sets the ondurationchange event handler for this element.
      void setOnemptied​(java.lang.Object onemptied)
      Sets the onemptied event handler for this element.
      void setOnended​(java.lang.Object onended)
      Sets the onended event handler for this element.
      void setOnerror​(java.lang.Object handler)
      Sets the onerror event handler for this element.
      void setOnfocus​(java.lang.Object handler)
      Sets the onfocus event handler for this element.
      void setOngotpointercapture​(java.lang.Object ongotpointercapture)
      Sets the ongotpointercapture event handler for this element.
      void setOninput​(java.lang.Object oninput)
      Sets the oninput event handler for this element.
      void setOninvalid​(java.lang.Object oninvalid)
      Sets the oninvalid event handler for this element.
      void setOnkeydown​(java.lang.Object handler)
      Sets the onkeydown event handler for this element.
      void setOnkeypress​(java.lang.Object handler)
      Sets the onkeypress event handler for this element.
      void setOnkeyup​(java.lang.Object handler)
      Sets the onkeyup event handler for this element.
      void setOnload​(java.lang.Object onload)
      Sets the onload event handler for this element.
      void setOnloadeddata​(java.lang.Object onloadeddata)
      Sets the onloadeddata event handler for this element.
      void setOnloadedmetadata​(java.lang.Object onloadedmetadata)
      Sets the onloadedmetadata event handler for this element.
      void setOnloadstart​(java.lang.Object onloadstart)
      Sets the onloadstart event handler for this element.
      void setOnlostpointercapture​(java.lang.Object onlostpointercapture)
      Sets the onlostpointercapture event handler for this element.
      void setOnmousedown​(java.lang.Object handler)
      Sets the onmousedown event handler for this element.
      void setOnmouseenter​(java.lang.Object onmouseenter)
      Sets the onmouseenter event handler for this element.
      void setOnmouseleave​(java.lang.Object onmouseleave)
      Sets the onmouseleave event handler for this element.
      void setOnmousemove​(java.lang.Object handler)
      Sets the onmousemove event handler for this element.
      void setOnmouseout​(java.lang.Object handler)
      Sets the onmouseout event handler for this element.
      void setOnmouseover​(java.lang.Object handler)
      Sets the onmouseover event handler for this element.
      void setOnmouseup​(java.lang.Object handler)
      Sets the onmouseup event handler for this element.
      void setOnmousewheel​(java.lang.Object onmousewheel)
      Sets the onmousewheel event handler for this element.
      void setOnmozfullscreenchange​(java.lang.Object onmozfullscreenchange)
      Sets the onmozfullscreenchange event handler for this element.
      void setOnmozfullscreenerror​(java.lang.Object onmozfullscreenerror)
      Sets the onmozfullscreenerror event handler for this element.
      void setOnpaste​(java.lang.Object onpaste)
      Sets the onpaste event handler for this element.
      void setOnpause​(java.lang.Object onpause)
      Sets the onpause event handler for this element.
      void setOnplay​(java.lang.Object onplay)
      Sets the onplay event handler for this element.
      void setOnplaying​(java.lang.Object onplaying)
      Sets the onplaying event handler for this element.
      void setOnpointercancel​(java.lang.Object onpointercancel)
      Sets the onpointercancel event handler for this element.
      void setOnpointerdown​(java.lang.Object onpointerdown)
      Sets the onpointerdown event handler for this element.
      void setOnpointerenter​(java.lang.Object onpointerenter)
      Sets the onpointerenter event handler for this element.
      void setOnpointerleave​(java.lang.Object onpointerleave)
      Sets the onpointerleave event handler for this element.
      void setOnpointerlockchange​(java.lang.Object onpointerlockchange)
      Sets the onpointerlockchange event handler for this element.
      void setOnpointerlockerror​(java.lang.Object onpointerlockerror)
      Sets the onpointerlockerror event handler for this element.
      void setOnpointermove​(java.lang.Object onpointermove)
      Sets the onpointermove event handler for this element.
      void setOnpointerout​(java.lang.Object onpointerout)
      Sets the onpointerout event handler for this element.
      void setOnpointerover​(java.lang.Object onpointerover)
      Sets the onpointerover event handler for this element.
      void setOnpointerup​(java.lang.Object onpointerup)
      Sets the onpointerup event handler for this element.
      void setOnprogress​(java.lang.Object onprogress)
      Sets the onprogress event handler for this element.
      void setOnratechange​(java.lang.Object onratechange)
      Sets the onratechange event handler for this element.
      void setOnreadystatechange​(java.lang.Object onreadystatechange)
      Sets the onreadystatechange event handler for this element.
      void setOnreset​(java.lang.Object onreset)
      Sets the onreset event handler for this element.
      void setOnresize​(java.lang.Object handler)
      Sets the onresize event handler for this element.
      void setOnscroll​(java.lang.Object onscroll)
      Sets the onscroll event handler for this element.
      void setOnsearch​(java.lang.Object onsearch)
      Sets the onsearch event handler for this element.
      void setOnseeked​(java.lang.Object onseeked)
      Sets the onseeked event handler for this element.
      void setOnseeking​(java.lang.Object onseeking)
      Sets the onseeking event handler for this element.
      void setOnselect​(java.lang.Object onselect)
      Sets the onselect event handler for this element.
      void setOnselectionchange​(java.lang.Object onselectionchange)
      Sets the onselectionchange event handler for this element.
      void setOnselectstart​(java.lang.Object onselectstart)
      Sets the onselectstart event handler for this element.
      void setOnstalled​(java.lang.Object onstalled)
      Sets the onstalled event handler for this element.
      void setOnsubmit​(java.lang.Object onsubmit)
      Sets the onsubmit event handler for this element.
      void setOnsuspend​(java.lang.Object onsuspend)
      Sets the onsuspend event handler for this element.
      void setOntimeupdate​(java.lang.Object ontimeupdate)
      Sets the ontimeupdate event handler for this element.
      void setOntoggle​(java.lang.Object ontoggle)
      Sets the ontoggle event handler for this element.
      void setOnvolumechange​(java.lang.Object onvolumechange)
      Sets the onvolumechange event handler for this element.
      void setOnwaiting​(java.lang.Object onwaiting)
      Sets the onwaiting event handler for this element.
      void setOnwebkitfullscreenchange​(java.lang.Object onwebkitfullscreenchange)
      Sets the onwebkitfullscreenchange event handler for this element.
      void setOnwebkitfullscreenerror​(java.lang.Object onwebkitfullscreenerror)
      Sets the onwebkitfullscreenerror event handler for this element.
      void setOnwheel​(java.lang.Object onwheel)
      Sets the onwheel event handler for this element.
      void setTitle​(java.lang.String title)
      Sets this document's title.
      void setVlinkColor​(java.lang.String color)
      Sets the value of the vlinkColor property.
      void setWindow​(Window window)
      Sets the Window JavaScript object that encloses this document.
      private static org.htmlunit.corejs.javascript.Scriptable staticGetPrototype​(Window window, java.lang.Class<? extends HtmlUnitScriptable> javaScriptClass)  
      • Methods 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
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        private static final org.apache.commons.logging.Log LOG
      • TAG_NAME_PATTERN

        private static final java.util.regex.Pattern TAG_NAME_PATTERN
      • EXECUTE_CMDS_FF

        private static final java.util.Set<java.lang.String> EXECUTE_CMDS_FF
        https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla#Executing_Commands
      • EXECUTE_CMDS_CHROME

        private static final java.util.Set<java.lang.String> EXECUTE_CMDS_CHROME
      • LAST_MODIFIED_DATE_FORMAT

        private static final java.lang.String LAST_MODIFIED_DATE_FORMAT
        The format to use for the lastModified attribute.
        See Also:
        Constant Field Values
      • SUPPORTED_DOM2_EVENT_TYPE_MAP

        private static final java.util.Map<java.lang.String,​java.lang.Class<? extends Event>> SUPPORTED_DOM2_EVENT_TYPE_MAP
        Contains all supported DOM level 2 events.
      • SUPPORTED_DOM3_EVENT_TYPE_MAP

        private static final java.util.Map<java.lang.String,​java.lang.Class<? extends Event>> SUPPORTED_DOM3_EVENT_TYPE_MAP
        Contains all supported DOM level 3 events. DOM level 2 events are not included.
      • SUPPORTED_VENDOR_EVENT_TYPE_MAP

        private static final java.util.Map<java.lang.String,​java.lang.Class<? extends Event>> SUPPORTED_VENDOR_EVENT_TYPE_MAP
        Contains all supported vendor specific events.
      • window_

        private Window window_
      • designMode_

        private java.lang.String designMode_
      • compatMode_

        private java.lang.String compatMode_
      • documentMode_

        private int documentMode_
      • domain_

        private java.lang.String domain_
      • lastModified_

        private java.lang.String lastModified_
      • currentScript_

        private org.htmlunit.corejs.javascript.ScriptableObject currentScript_
      • blobUrl2Blobs_

        private final java.util.Map<java.lang.String,​Blob> blobUrl2Blobs_
    • Constructor Detail

      • Document

        public Document()
        Creates an instance.
    • Method Detail

      • jsConstructor

        public void jsConstructor()
        JavaScript constructor.
        Overrides:
        jsConstructor in class Node
      • setWindow

        public void setWindow​(Window window)
        Sets the Window JavaScript object that encloses this document.
        Parameters:
        window - the Window JavaScript object that encloses this document
      • getLocation

        public Location getLocation()
        Returns the value of the location property.
        Returns:
        the value of the location property
      • setLocation

        public void setLocation​(java.lang.String location)
                         throws java.io.IOException
        Sets the value of the location property. 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:
        java.io.IOException - when location loading fails
        See Also:
        MSDN documentation
      • getReferrer

        public java.lang.String getReferrer()
        Returns the value of the referrer property.
        Returns:
        the value of the referrer property
      • getDocumentElement

        public Element getDocumentElement()
        Gets the JavaScript property documentElement for the document.
        Returns:
        the root node for the document
      • getRootElement

        public Element getRootElement()
        Gets the JavaScript property rootElement.
        Returns:
        the root node for the document
      • getDoctype

        public HtmlUnitScriptable getDoctype()
        Gets the JavaScript property doctype for the document.
        Returns:
        the DocumentType of the document
      • getDesignMode

        public java.lang.String 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

        public void setDesignMode​(java.lang.String mode)
        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

        public SgmlPage getPage()
        Returns the page that this document is modeling.
        Returns:
        the page that this document is modeling
      • getDefaultView

        public java.lang.Object getDefaultView()
        Gets the window in which this document is contained.
        Returns:
        the window
      • createDocumentFragment

        public java.lang.Object createDocumentFragment()
        Creates a new document fragment.
        Returns:
        a newly created document fragment
      • createAttribute

        public Attr createAttribute​(java.lang.String attributeName)
        Creates a new HTML attribute with the specified name.
        Parameters:
        attributeName - the name of the attribute to create
        Returns:
        an attribute with the specified name
      • importNode

        public HtmlUnitScriptable importNode​(Node importedNode,
                                             boolean deep)
        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 import
        deep - Whether to recursively import the subtree under the specified node; or not
        Returns:
        the imported node that belongs to this Document
      • adoptNode

        public java.lang.Object adoptNode​(Node externalNode)
        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

        public DOMImplementation getImplementation()
        Returns the implementation object of the current document.
        Returns:
        implementation-specific object
      • createNSResolver

        public XPathNSResolver 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.
        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

        public java.lang.Object createTextNode​(java.lang.String newData)
        Create a new DOM text node with the given data.
        Parameters:
        newData - the string value for the text node
        Returns:
        the new text node or NOT_FOUND if there is an error
      • createComment

        public java.lang.Object createComment​(java.lang.String comment)
        Creates a new Comment.
        Parameters:
        comment - the comment text
        Returns:
        the new Comment
      • evaluate

        public XPathResult evaluate​(java.lang.String expression,
                                    Node contextNode,
                                    java.lang.Object resolver,
                                    int type,
                                    java.lang.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 evaluated
        contextNode - the context node for the evaluation of this XPath expression
        resolver - 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 type
        result - the result object which may be reused and returned by this method
        Returns:
        the result of the evaluation of the XPath expression
      • createElement

        public java.lang.Object createElement​(java.lang.String tagName)
        Creates a new element with the given tag name.
        Parameters:
        tagName - the tag name
        Returns:
        the new HTML element, or NOT_FOUND if the tag is not supported
      • createElementNS

        public java.lang.Object createElementNS​(java.lang.String namespaceURI,
                                                java.lang.String qualifiedName)
        Creates a new HTML element with the given tag name, and name.
        Parameters:
        namespaceURI - the URI that identifies an XML namespace
        qualifiedName - the qualified name of the element type to instantiate
        Returns:
        the new HTML element, or NOT_FOUND if the tag is not supported
      • getElementsByTagName

        public HTMLCollection getElementsByTagName​(java.lang.String tagName)
        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

        public java.lang.Object getElementsByTagNameNS​(java.lang.Object namespaceURI,
                                                       java.lang.String localName)
        Returns a list of elements with the given tag name belonging to the given namespace.
        Parameters:
        namespaceURI - the namespace URI of elements to look for
        localName - 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

        public java.lang.Object getActiveElement()
        Returns the value of the activeElement property.
        Returns:
        the value of the activeElement property
        See Also:
        MSDN documentation
      • getCharacterSet

        public java.lang.String getCharacterSet()
        Returns the character encoding of the current document.
        Returns:
        the character encoding of the current document
      • getCharset

        public java.lang.String getCharset()
        Retrieves the character set used to encode the document.
        Returns:
        the character set used to encode the document
      • getAnchors

        public java.lang.Object getAnchors()
        Returns the value of the JavaScript property anchors.
        Returns:
        the value of this property
        See Also:
        MSDN documentation, Gecko DOM reference
      • getBody

        public HTMLElement getBody()
        Returns this document's body element.
        Returns:
        this document's body element
      • setBody

        public void setBody​(HTMLElement htmlElement)
        Sets the body element of the document.
        Parameters:
        htmlElement - the new html element
      • getCompatMode

        public java.lang.String getCompatMode()
        Returns the compatMode property.
        Returns:
        the compatMode property
      • getDocumentMode

        public int getDocumentMode()
        Returns the documentMode property.
        Returns:
        the documentMode property
      • 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

        public Node querySelector​(java.lang.String selectors)
        Returns the first element within the document that matches the specified group of selectors.
        Parameters:
        selectors - the selectors
        Returns:
        null if no matches are found; otherwise, it returns the first matching element
      • querySelectorAll

        public NodeList querySelectorAll​(java.lang.String selectors)
        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

        public boolean queryCommandSupported​(java.lang.String cmd)
        Indicates if the command is supported.
        Parameters:
        cmd - the command identifier
        Returns:
        true if the command is supported
        See Also:
        MSDN documentation
      • hasCommand

        private boolean hasCommand​(java.lang.String cmd,
                                   boolean includeBold)
      • queryCommandEnabled

        public boolean queryCommandEnabled​(java.lang.String cmd)
        Indicates if the command can be successfully executed using execCommand, given the current state of the document.
        Parameters:
        cmd - the command identifier
        Returns:
        true if the command can be successfully executed
      • execCommand

        public boolean execCommand​(java.lang.String cmd,
                                   boolean userInterface,
                                   java.lang.Object value)
        Executes a command.
        Parameters:
        cmd - the command identifier
        userInterface - display a user interface if the command supports one
        value - the string, number, or other value to assign (possible values depend on the command)
        Returns:
        true if the command was successful, false otherwise
        See Also:
        MSDN documentation
      • getURL_js

        public java.lang.String getURL_js()
        Returns the value of the URL property.
        Returns:
        the value of the URL property
      • getDocumentURI

        public java.lang.String getDocumentURI()
        Returns the value of the documentURI property.
        Returns:
        the value of the documentURI property
      • getCookie

        public java.lang.String getCookie()
        Returns the cookie property.
        Returns:
        the cookie property
      • createEvent

        public Event createEvent​(java.lang.String eventType)
                          throws org.w3c.dom.DOMException
        Implementation of the DocumentEvent interface's DocumentEvent.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:
        org.w3c.dom.DOMException - if the event type is not supported (will have a type of DOMException.NOT_SUPPORTED_ERR)
        See Also:
        DocumentEvent
      • 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 of NodeFilter
        filter - an object implementing the NodeFilter interface
        Returns:
        a new NodeIterator object
      • createFilterWrapper

        private static org.w3c.dom.traversal.NodeFilter createFilterWrapper​(org.htmlunit.corejs.javascript.Scriptable filter,
                                                                            boolean filterFunctionOnly)
      • createTreeWalker

        public java.lang.Object createTreeWalker​(Node root,
                                                 double whatToShow,
                                                 org.htmlunit.corejs.javascript.Scriptable filter,
                                                 boolean expandEntityReferences)
                                          throws org.w3c.dom.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 NodeFilter for the set of possible Show_ values.
        • JavaScript param 3: The NodeFilter to be used with this TreeWalker, or null to 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 TreeWalker
        whatToShow - specifies which node types may appear in the logical view of the tree presented
        filter - the NodeFilter to be used with this TreeWalker, or null to indicate no filter
        expandEntityReferences - If false, the contents of EntityReference nodes are not presented in the logical view
        Returns:
        a new TreeWalker
        Throws:
        org.w3c.dom.DOMException - on attempt to create a TreeWalker with a root that is null
        See Also:
        DOM-Level-2-Traversal-Range
      • staticGetPrototype

        private static org.htmlunit.corejs.javascript.Scriptable staticGetPrototype​(Window window,
                                                                                    java.lang.Class<? extends HtmlUnitScriptable> javaScriptClass)
      • createRange

        public Range createRange()
        Creates and returns a new range.
        Returns:
        a new range
        See Also:
        XUL Planet
      • getDomain

        public java.lang.String getDomain()
        Returns the domain name of the server that served the document, or null if the server cannot be identified by a domain name.
        Returns:
        the domain name of the server that served the document
        See Also:
        W3C documentation
      • setDomain

        public void setDomain​(java.lang.String newDomain)
        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:

        1. If the newDomain.equalsIgnoreCase(currentDomain) the method returns with no error.
        2. If the browser version is netscape, the newDomain is downshifted.
        3. 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

        public void setOnclick​(java.lang.Object handler)
        Sets the onclick event handler for this element.
        Parameters:
        handler - the onclick event handler for this element
      • getOnclick

        public java.lang.Object getOnclick()
        Returns the onclick event handler for this element.
        Returns:
        the onclick event handler for this element
      • setOndblclick

        public void setOndblclick​(java.lang.Object handler)
        Sets the ondblclick event handler for this element.
        Parameters:
        handler - the ondblclick event handler for this element
      • getOndblclick

        public java.lang.Object getOndblclick()
        Returns the ondblclick event handler for this element.
        Returns:
        the ondblclick event handler for this element
      • setOnblur

        public void setOnblur​(java.lang.Object handler)
        Sets the onblur event handler for this element.
        Parameters:
        handler - the onblur event handler for this element
      • getOnblur

        public java.lang.Object getOnblur()
        Returns the onblur event handler for this element.
        Returns:
        the onblur event handler for this element
      • setOnfocus

        public void setOnfocus​(java.lang.Object handler)
        Sets the onfocus event handler for this element.
        Parameters:
        handler - the onfocus event handler for this element
      • getOnfocus

        public java.lang.Object getOnfocus()
        Returns the onfocus event handler for this element.
        Returns:
        the onfocus event handler for this element
      • setOnkeydown

        public void setOnkeydown​(java.lang.Object handler)
        Sets the onkeydown event handler for this element.
        Parameters:
        handler - the onkeydown event handler for this element
      • getOnkeydown

        public java.lang.Object getOnkeydown()
        Returns the onkeydown event handler for this element.
        Returns:
        the onkeydown event handler for this element
      • setOnkeypress

        public void setOnkeypress​(java.lang.Object handler)
        Sets the onkeypress event handler for this element.
        Parameters:
        handler - the onkeypress event handler for this element
      • getOnkeypress

        public java.lang.Object getOnkeypress()
        Returns the onkeypress event handler for this element.
        Returns:
        the onkeypress event handler for this element
      • setOnkeyup

        public void setOnkeyup​(java.lang.Object handler)
        Sets the onkeyup event handler for this element.
        Parameters:
        handler - the onkeyup event handler for this element
      • getOnkeyup

        public java.lang.Object getOnkeyup()
        Returns the onkeyup event handler for this element.
        Returns:
        the onkeyup event handler for this element
      • setOnmousedown

        public void setOnmousedown​(java.lang.Object handler)
        Sets the onmousedown event handler for this element.
        Parameters:
        handler - the onmousedown event handler for this element
      • getOnmousedown

        public java.lang.Object getOnmousedown()
        Returns the onmousedown event handler for this element.
        Returns:
        the onmousedown event handler for this element
      • setOnmousemove

        public void setOnmousemove​(java.lang.Object handler)
        Sets the onmousemove event handler for this element.
        Parameters:
        handler - the onmousemove event handler for this element
      • getOnmousemove

        public java.lang.Object getOnmousemove()
        Returns the onmousemove event handler for this element.
        Returns:
        the onmousemove event handler for this element
      • setOnmouseout

        public void setOnmouseout​(java.lang.Object handler)
        Sets the onmouseout event handler for this element.
        Parameters:
        handler - the onmouseout event handler for this element
      • getOnmouseout

        public java.lang.Object getOnmouseout()
        Returns the onmouseout event handler for this element.
        Returns:
        the onmouseout event handler for this element
      • setOnmouseover

        public void setOnmouseover​(java.lang.Object handler)
        Sets the onmouseover event handler for this element.
        Parameters:
        handler - the onmouseover event handler for this element
      • getOnmouseover

        public java.lang.Object getOnmouseover()
        Returns the onmouseover event handler for this element.
        Returns:
        the onmouseover event handler for this element
      • setOnmouseup

        public void setOnmouseup​(java.lang.Object handler)
        Sets the onmouseup event handler for this element.
        Parameters:
        handler - the onmouseup event handler for this element
      • getOnmouseup

        public java.lang.Object getOnmouseup()
        Returns the onmouseup event handler for this element.
        Returns:
        the onmouseup event handler for this element
      • setOncontextmenu

        public void setOncontextmenu​(java.lang.Object handler)
        Sets the oncontextmenu event handler for this element.
        Parameters:
        handler - the oncontextmenu event handler for this element
      • getOncontextmenu

        public java.lang.Object getOncontextmenu()
        Returns the oncontextmenu event handler for this element.
        Returns:
        the oncontextmenu event handler for this element
      • setOnresize

        public void setOnresize​(java.lang.Object handler)
        Sets the onresize event handler for this element.
        Parameters:
        handler - the onresize event handler for this element
      • getOnresize

        public java.lang.Object getOnresize()
        Returns the onresize event handler for this element.
        Returns:
        the onresize event handler for this element
      • setOnerror

        public void setOnerror​(java.lang.Object handler)
        Sets the onerror event handler for this element.
        Parameters:
        handler - the onerror event handler for this element
      • getOnerror

        public java.lang.Object getOnerror()
        Returns the onerror event handler for this element.
        Returns:
        the onerror event handler for this element
      • getOninput

        public org.htmlunit.corejs.javascript.Function getOninput()
        Returns the oninput event handler for this element.
        Returns:
        the oninput event handler for this element
      • setOninput

        public void setOninput​(java.lang.Object oninput)
        Sets the oninput event handler for this element.
        Parameters:
        oninput - the oninput event handler for this element
      • getHidden

        public boolean getHidden()
        Returns the hidden property.
        Returns:
        the hidden property
      • getChildElementCount

        public int getChildElementCount()
        Returns the current number of child elements.
        Overrides:
        getChildElementCount in class Node
        Returns:
        the child element count
      • elementFromPoint

        public java.lang.Object elementFromPoint​(int x,
                                                 int y)
        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 pixels
        y - the y offset, in pixels
        Returns:
        the element for the specified x coordinate and the specified y coordinate
      • getForms

        public java.lang.Object getForms()
        Returns the value of the forms property.
        Returns:
        the value of the forms property
      • getEmbeds

        public java.lang.Object getEmbeds()
        Returns the value of the embeds property.
        Returns:
        the value of the embeds property
      • getImages

        public java.lang.Object getImages()
        Returns the value of the embeds property.
        Returns:
        the value of the embeds property
      • getScripts

        public java.lang.Object getScripts()
        Returns the value of the scripts property.
        Returns:
        the value of the scripts property
      • getStyleSheets

        public StyleSheetList getStyleSheets()
        Retrieves a collection of stylesheet objects representing the style sheets that correspond to each instance of a Link or CSSStyleDeclaration object in the document.
        Returns:
        styleSheet collection
      • getPlugins

        public java.lang.Object getPlugins()
        Returns the value of the plugins property.
        Returns:
        the value of the plugins property
      • getLinks

        public java.lang.Object getLinks()
        Returns the value of the JavaScript property links. Refer also to the MSDN documentation.
        Returns:
        the value of this property
      • getElementsByClassName

        public HTMLCollection getElementsByClassName​(java.lang.String className)
        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:
        Mozilla doc
      • getElementsByName

        public NodeList getElementsByName​(java.lang.String elementName)
        Returns all HTML elements that have a name attribute with the specified value.

        Refer to The DOM spec for details.

        Parameters:
        elementName - - value of the name attribute to look for
        Returns:
        all HTML elements that have a name attribute with the specified value
      • hasFocus

        public boolean hasFocus()
        Returns false if the active element in the document has no focus; true if the active element in the document has focus.
        Returns:
        whether the active element in the document has focus or not
      • getTitle

        public java.lang.String getTitle()
        Returns this document's title.
        Returns:
        this document's title
      • setTitle

        public void setTitle​(java.lang.String title)
        Sets this document's title.
        Parameters:
        title - the new title
      • getContentType

        public java.lang.String getContentType()
        Returns the contentType property.
        Returns:
        the contentType property
      • getSelection

        public Selection getSelection()
        Returns the current selection.
        Returns:
        the current selection
      • getHead

        public java.lang.Object getHead()
        Returns this document's head element.
        Returns:
        this document's head element
      • getInputEncoding

        public java.lang.String 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

        public java.lang.String getLastModified()
        Returns the last modification date of the document.
        Returns:
        the date as string
        See Also:
        Mozilla documentation
      • parseDateOrNow

        private static java.util.Date parseDateOrNow​(java.lang.String stringDate)
      • releaseCapture

        public void releaseCapture()
        Mock for the moment.
      • captureEvents

        public void captureEvents​(java.lang.String type)
        Does nothing special anymore.
        Parameters:
        type - the type of events to capture
        See Also:
        Window.captureEvents(String)
      • releaseEvents

        public void releaseEvents​(java.lang.String type)
        Does nothing special anymore.
        Parameters:
        type - the type of events to capture
        See Also:
        Window.releaseEvents(String)
      • getAlinkColor

        public java.lang.String getAlinkColor()
        Returns the value of the alinkColor property.
        Returns:
        the value of the alinkColor property
      • setAlinkColor

        public void setAlinkColor​(java.lang.String color)
        Sets the value of the alinkColor property.
        Parameters:
        color - the value of the alinkColor property
      • getBgColor

        public java.lang.String getBgColor()
        Returns the value of the bgColor property.
        Returns:
        the value of the bgColor property
        See Also:
        MSDN Documentation
      • setBgColor

        public void setBgColor​(java.lang.String color)
        Sets the value of the bgColor property.
        Parameters:
        color - the value of the bgColor property
        See Also:
        MSDN Documentation
      • getFgColor

        public java.lang.String getFgColor()
        Returns the value of the fgColor property.
        Returns:
        the value of the fgColor property
      • setFgColor

        public void setFgColor​(java.lang.String color)
        Sets the value of the fgColor property.
        Parameters:
        color - the value of the fgColor property
      • getLinkColor

        public java.lang.String getLinkColor()
        Returns the value of the linkColor property.
        Returns:
        the value of the linkColor property
      • setLinkColor

        public void setLinkColor​(java.lang.String color)
        Sets the value of the linkColor property.
        Parameters:
        color - the value of the linkColor property
      • getVlinkColor

        public java.lang.String getVlinkColor()
        Returns the value of the vlinkColor property.
        Returns:
        the value of the vlinkColor property
      • setVlinkColor

        public void setVlinkColor​(java.lang.String color)
        Sets the value of the vlinkColor property.
        Parameters:
        color - the value of the vlinkColor property
      • getLastElementChild

        public Element getLastElementChild()
        Returns the last element child.
        Overrides:
        getLastElementChild in class Node
        Returns:
        the last element child
      • getFirstElementChild

        public Element getFirstElementChild()
        Returns the first element child.
        Overrides:
        getFirstElementChild in class Node
        Returns:
        the first element child
      • getXmlEncoding

        public java.lang.String getXmlEncoding()
        Returns the xmlEncoding property.
        Returns:
        the xmlEncoding property
      • isXmlStandalone

        public boolean isXmlStandalone()
        Returns the xmlStandalone property.
        Returns:
        the xmlStandalone property
      • getXmlVersion

        public java.lang.String getXmlVersion()
        Returns the xmlVersion property.
        Returns:
        the xmlVersion property
      • getOnabort

        public org.htmlunit.corejs.javascript.Function getOnabort()
        Returns the onabort event handler for this element.
        Returns:
        the onabort event handler for this element
      • setOnabort

        public void setOnabort​(java.lang.Object onabort)
        Sets the onabort event handler for this element.
        Parameters:
        onabort - the onabort event handler for this element
      • getOnauxclick

        public org.htmlunit.corejs.javascript.Function getOnauxclick()
        Returns the onauxclick event handler for this element.
        Returns:
        the onauxclick event handler for this element
      • setOnauxclick

        public void setOnauxclick​(java.lang.Object onauxclick)
        Sets the onauxclick event handler for this element.
        Parameters:
        onauxclick - the onauxclick event handler for this element
      • getOnbeforecopy

        public org.htmlunit.corejs.javascript.Function getOnbeforecopy()
        Returns the onbeforecopy event handler for this element.
        Returns:
        the onbeforecopy event handler for this element
      • setOnbeforecopy

        public void setOnbeforecopy​(java.lang.Object onbeforecopy)
        Sets the onbeforecopy event handler for this element.
        Parameters:
        onbeforecopy - the onbeforecopy event handler for this element
      • getOnbeforecut

        public org.htmlunit.corejs.javascript.Function getOnbeforecut()
        Returns the onbeforecut event handler for this element.
        Returns:
        the onbeforecut event handler for this element
      • setOnbeforecut

        public void setOnbeforecut​(java.lang.Object onbeforecut)
        Sets the onbeforecut event handler for this element.
        Parameters:
        onbeforecut - the onbeforecut event handler for this element
      • getOnbeforepaste

        public org.htmlunit.corejs.javascript.Function getOnbeforepaste()
        Returns the onbeforepaste event handler for this element.
        Returns:
        the onbeforepaste event handler for this element
      • setOnbeforepaste

        public void setOnbeforepaste​(java.lang.Object onbeforepaste)
        Sets the onbeforepaste event handler for this element.
        Parameters:
        onbeforepaste - the onbeforepaste event handler for this element
      • getOncancel

        public org.htmlunit.corejs.javascript.Function getOncancel()
        Returns the oncancel event handler for this element.
        Returns:
        the oncancel event handler for this element
      • setOncancel

        public void setOncancel​(java.lang.Object oncancel)
        Sets the oncancel event handler for this element.
        Parameters:
        oncancel - the oncancel event handler for this element
      • getOncanplay

        public org.htmlunit.corejs.javascript.Function getOncanplay()
        Returns the oncanplay event handler for this element.
        Returns:
        the oncanplay event handler for this element
      • setOncanplay

        public void setOncanplay​(java.lang.Object oncanplay)
        Sets the oncanplay event handler for this element.
        Parameters:
        oncanplay - the oncanplay event handler for this element
      • getOncanplaythrough

        public org.htmlunit.corejs.javascript.Function getOncanplaythrough()
        Returns the oncanplaythrough event handler for this element.
        Returns:
        the oncanplaythrough event handler for this element
      • setOncanplaythrough

        public void setOncanplaythrough​(java.lang.Object oncanplaythrough)
        Sets the oncanplaythrough event handler for this element.
        Parameters:
        oncanplaythrough - the oncanplaythrough event handler for this element
      • getOnchange

        public org.htmlunit.corejs.javascript.Function getOnchange()
        Returns the onchange event handler for this element.
        Returns:
        the onchange event handler for this element
      • setOnchange

        public void setOnchange​(java.lang.Object onchange)
        Sets the onchange event handler for this element.
        Parameters:
        onchange - the onchange event handler for this element
      • getOnclose

        public org.htmlunit.corejs.javascript.Function getOnclose()
        Returns the onclose event handler for this element.
        Returns:
        the onclose event handler for this element
      • setOnclose

        public void setOnclose​(java.lang.Object onclose)
        Sets the onclose event handler for this element.
        Parameters:
        onclose - the onclose event handler for this element
      • getOncopy

        public org.htmlunit.corejs.javascript.Function getOncopy()
        Returns the oncopy event handler for this element.
        Returns:
        the oncopy event handler for this element
      • setOncopy

        public void setOncopy​(java.lang.Object oncopy)
        Sets the oncopy event handler for this element.
        Parameters:
        oncopy - the oncopy event handler for this element
      • getOncuechange

        public org.htmlunit.corejs.javascript.Function getOncuechange()
        Returns the oncuechange event handler for this element.
        Returns:
        the oncuechange event handler for this element
      • setOncuechange

        public void setOncuechange​(java.lang.Object oncuechange)
        Sets the oncuechange event handler for this element.
        Parameters:
        oncuechange - the oncuechange event handler for this element
      • getOncut

        public org.htmlunit.corejs.javascript.Function getOncut()
        Returns the oncut event handler for this element.
        Returns:
        the oncut event handler for this element
      • setOncut

        public void setOncut​(java.lang.Object oncut)
        Sets the oncut event handler for this element.
        Parameters:
        oncut - the oncut event handler for this element
      • getOndrag

        public org.htmlunit.corejs.javascript.Function getOndrag()
        Returns the ondrag event handler for this element.
        Returns:
        the ondrag event handler for this element
      • setOndrag

        public void setOndrag​(java.lang.Object ondrag)
        Sets the ondrag event handler for this element.
        Parameters:
        ondrag - the ondrag event handler for this element
      • getOndragend

        public org.htmlunit.corejs.javascript.Function getOndragend()
        Returns the ondragend event handler for this element.
        Returns:
        the ondragend event handler for this element
      • setOndragend

        public void setOndragend​(java.lang.Object ondragend)
        Sets the ondragend event handler for this element.
        Parameters:
        ondragend - the ondragend event handler for this element
      • getOndragenter

        public org.htmlunit.corejs.javascript.Function getOndragenter()
        Returns the ondragenter event handler for this element.
        Returns:
        the ondragenter event handler for this element
      • setOndragenter

        public void setOndragenter​(java.lang.Object ondragenter)
        Sets the ondragenter event handler for this element.
        Parameters:
        ondragenter - the ondragenter event handler for this element
      • getOndragleave

        public org.htmlunit.corejs.javascript.Function getOndragleave()
        Returns the ondragleave event handler for this element.
        Returns:
        the ondragleave event handler for this element
      • setOndragleave

        public void setOndragleave​(java.lang.Object ondragleave)
        Sets the ondragleave event handler for this element.
        Parameters:
        ondragleave - the ondragleave event handler for this element
      • getOndragover

        public org.htmlunit.corejs.javascript.Function getOndragover()
        Returns the ondragover event handler for this element.
        Returns:
        the ondragover event handler for this element
      • setOndragover

        public void setOndragover​(java.lang.Object ondragover)
        Sets the ondragover event handler for this element.
        Parameters:
        ondragover - the ondragover event handler for this element
      • getOndragstart

        public org.htmlunit.corejs.javascript.Function getOndragstart()
        Returns the ondragstart event handler for this element.
        Returns:
        the ondragstart event handler for this element
      • setOndragstart

        public void setOndragstart​(java.lang.Object ondragstart)
        Sets the ondragstart event handler for this element.
        Parameters:
        ondragstart - the ondragstart event handler for this element
      • getOndrop

        public org.htmlunit.corejs.javascript.Function getOndrop()
        Returns the ondrop event handler for this element.
        Returns:
        the ondrop event handler for this element
      • setOndrop

        public void setOndrop​(java.lang.Object ondrop)
        Sets the ondrop event handler for this element.
        Parameters:
        ondrop - the ondrop event handler for this element
      • getOndurationchange

        public org.htmlunit.corejs.javascript.Function getOndurationchange()
        Returns the ondurationchange event handler for this element.
        Returns:
        the ondurationchange event handler for this element
      • setOndurationchange

        public void setOndurationchange​(java.lang.Object ondurationchange)
        Sets the ondurationchange event handler for this element.
        Parameters:
        ondurationchange - the ondurationchange event handler for this element
      • getOnemptied

        public org.htmlunit.corejs.javascript.Function getOnemptied()
        Returns the onemptied event handler for this element.
        Returns:
        the onemptied event handler for this element
      • setOnemptied

        public void setOnemptied​(java.lang.Object onemptied)
        Sets the onemptied event handler for this element.
        Parameters:
        onemptied - the onemptied event handler for this element
      • getOnended

        public org.htmlunit.corejs.javascript.Function getOnended()
        Returns the onended event handler for this element.
        Returns:
        the onended event handler for this element
      • setOnended

        public void setOnended​(java.lang.Object onended)
        Sets the onended event handler for this element.
        Parameters:
        onended - the onended event handler for this element
      • getOngotpointercapture

        public org.htmlunit.corejs.javascript.Function getOngotpointercapture()
        Returns the ongotpointercapture event handler for this element.
        Returns:
        the ongotpointercapture event handler for this element
      • setOngotpointercapture

        public void setOngotpointercapture​(java.lang.Object ongotpointercapture)
        Sets the ongotpointercapture event handler for this element.
        Parameters:
        ongotpointercapture - the ongotpointercapture event handler for this element
      • getOninvalid

        public org.htmlunit.corejs.javascript.Function getOninvalid()
        Returns the oninvalid event handler for this element.
        Returns:
        the oninvalid event handler for this element
      • setOninvalid

        public void setOninvalid​(java.lang.Object oninvalid)
        Sets the oninvalid event handler for this element.
        Parameters:
        oninvalid - the oninvalid event handler for this element
      • getOnload

        public org.htmlunit.corejs.javascript.Function getOnload()
        Returns the onload event handler for this element.
        Returns:
        the onload event handler for this element
      • setOnload

        public void setOnload​(java.lang.Object onload)
        Sets the onload event handler for this element.
        Parameters:
        onload - the onload event handler for this element
      • getOnloadeddata

        public org.htmlunit.corejs.javascript.Function getOnloadeddata()
        Returns the onloadeddata event handler for this element.
        Returns:
        the onloadeddata event handler for this element
      • setOnloadeddata

        public void setOnloadeddata​(java.lang.Object onloadeddata)
        Sets the onloadeddata event handler for this element.
        Parameters:
        onloadeddata - the onloadeddata event handler for this element
      • getOnloadedmetadata

        public org.htmlunit.corejs.javascript.Function getOnloadedmetadata()
        Returns the onloadedmetadata event handler for this element.
        Returns:
        the onloadedmetadata event handler for this element
      • setOnloadedmetadata

        public void setOnloadedmetadata​(java.lang.Object onloadedmetadata)
        Sets the onloadedmetadata event handler for this element.
        Parameters:
        onloadedmetadata - the onloadedmetadata event handler for this element
      • getOnloadstart

        public org.htmlunit.corejs.javascript.Function getOnloadstart()
        Returns the onloadstart event handler for this element.
        Returns:
        the onloadstart event handler for this element
      • setOnloadstart

        public void setOnloadstart​(java.lang.Object onloadstart)
        Sets the onloadstart event handler for this element.
        Parameters:
        onloadstart - the onloadstart event handler for this element
      • getOnlostpointercapture

        public org.htmlunit.corejs.javascript.Function getOnlostpointercapture()
        Returns the onlostpointercapture event handler for this element.
        Returns:
        the onlostpointercapture event handler for this element
      • setOnlostpointercapture

        public void setOnlostpointercapture​(java.lang.Object onlostpointercapture)
        Sets the onlostpointercapture event handler for this element.
        Parameters:
        onlostpointercapture - the onlostpointercapture event handler for this element
      • getOnmouseenter

        public org.htmlunit.corejs.javascript.Function getOnmouseenter()
        Returns the onmouseenter event handler for this element.
        Returns:
        the onmouseenter event handler for this element
      • setOnmouseenter

        public void setOnmouseenter​(java.lang.Object onmouseenter)
        Sets the onmouseenter event handler for this element.
        Parameters:
        onmouseenter - the onmouseenter event handler for this element
      • getOnmouseleave

        public org.htmlunit.corejs.javascript.Function getOnmouseleave()
        Returns the onmouseleave event handler for this element.
        Returns:
        the onmouseleave event handler for this element
      • setOnmouseleave

        public void setOnmouseleave​(java.lang.Object onmouseleave)
        Sets the onmouseleave event handler for this element.
        Parameters:
        onmouseleave - the onmouseleave event handler for this element
      • getOnmousewheel

        public org.htmlunit.corejs.javascript.Function getOnmousewheel()
        Returns the onmousewheel event handler for this element.
        Returns:
        the onmousewheel event handler for this element
      • setOnmousewheel

        public void setOnmousewheel​(java.lang.Object onmousewheel)
        Sets the onmousewheel event handler for this element.
        Parameters:
        onmousewheel - the onmousewheel event handler for this element
      • getOnpaste

        public org.htmlunit.corejs.javascript.Function getOnpaste()
        Returns the onpaste event handler for this element.
        Returns:
        the onpaste event handler for this element
      • setOnpaste

        public void setOnpaste​(java.lang.Object onpaste)
        Sets the onpaste event handler for this element.
        Parameters:
        onpaste - the onpaste event handler for this element
      • getOnpause

        public org.htmlunit.corejs.javascript.Function getOnpause()
        Returns the onpause event handler for this element.
        Returns:
        the onpause event handler for this element
      • setOnpause

        public void setOnpause​(java.lang.Object onpause)
        Sets the onpause event handler for this element.
        Parameters:
        onpause - the onpause event handler for this element
      • getOnplay

        public org.htmlunit.corejs.javascript.Function getOnplay()
        Returns the onplay event handler for this element.
        Returns:
        the onplay event handler for this element
      • setOnplay

        public void setOnplay​(java.lang.Object onplay)
        Sets the onplay event handler for this element.
        Parameters:
        onplay - the onplay event handler for this element
      • getOnplaying

        public org.htmlunit.corejs.javascript.Function getOnplaying()
        Returns the onplaying event handler for this element.
        Returns:
        the onplaying event handler for this element
      • setOnplaying

        public void setOnplaying​(java.lang.Object onplaying)
        Sets the onplaying event handler for this element.
        Parameters:
        onplaying - the onplaying event handler for this element
      • getOnpointercancel

        public org.htmlunit.corejs.javascript.Function getOnpointercancel()
        Returns the onpointercancel event handler for this element.
        Returns:
        the onpointercancel event handler for this element
      • setOnpointercancel

        public void setOnpointercancel​(java.lang.Object onpointercancel)
        Sets the onpointercancel event handler for this element.
        Parameters:
        onpointercancel - the onpointercancel event handler for this element
      • getOnpointerdown

        public org.htmlunit.corejs.javascript.Function getOnpointerdown()
        Returns the onpointerdown event handler for this element.
        Returns:
        the onpointerdown event handler for this element
      • setOnpointerdown

        public void setOnpointerdown​(java.lang.Object onpointerdown)
        Sets the onpointerdown event handler for this element.
        Parameters:
        onpointerdown - the onpointerdown event handler for this element
      • getOnpointerenter

        public org.htmlunit.corejs.javascript.Function getOnpointerenter()
        Returns the onpointerenter event handler for this element.
        Returns:
        the onpointerenter event handler for this element
      • setOnpointerenter

        public void setOnpointerenter​(java.lang.Object onpointerenter)
        Sets the onpointerenter event handler for this element.
        Parameters:
        onpointerenter - the onpointerenter event handler for this element
      • getOnpointerleave

        public org.htmlunit.corejs.javascript.Function getOnpointerleave()
        Returns the onpointerleave event handler for this element.
        Returns:
        the onpointerleave event handler for this element
      • setOnpointerleave

        public void setOnpointerleave​(java.lang.Object onpointerleave)
        Sets the onpointerleave event handler for this element.
        Parameters:
        onpointerleave - the onpointerleave event handler for this element
      • getOnpointerlockchange

        public org.htmlunit.corejs.javascript.Function getOnpointerlockchange()
        Returns the onpointerlockchange event handler for this element.
        Returns:
        the onpointerlockchange event handler for this element
      • setOnpointerlockchange

        public void setOnpointerlockchange​(java.lang.Object onpointerlockchange)
        Sets the onpointerlockchange event handler for this element.
        Parameters:
        onpointerlockchange - the onpointerlockchange event handler for this element
      • getOnpointerlockerror

        public org.htmlunit.corejs.javascript.Function getOnpointerlockerror()
        Returns the onpointerlockerror event handler for this element.
        Returns:
        the onpointerlockerror event handler for this element
      • setOnpointerlockerror

        public void setOnpointerlockerror​(java.lang.Object onpointerlockerror)
        Sets the onpointerlockerror event handler for this element.
        Parameters:
        onpointerlockerror - the onpointerlockerror event handler for this element
      • getOnpointermove

        public org.htmlunit.corejs.javascript.Function getOnpointermove()
        Returns the onpointermove event handler for this element.
        Returns:
        the onpointermove event handler for this element
      • setOnpointermove

        public void setOnpointermove​(java.lang.Object onpointermove)
        Sets the onpointermove event handler for this element.
        Parameters:
        onpointermove - the onpointermove event handler for this element
      • getOnpointerout

        public org.htmlunit.corejs.javascript.Function getOnpointerout()
        Returns the onpointerout event handler for this element.
        Returns:
        the onpointerout event handler for this element
      • setOnpointerout

        public void setOnpointerout​(java.lang.Object onpointerout)
        Sets the onpointerout event handler for this element.
        Parameters:
        onpointerout - the onpointerout event handler for this element
      • getOnpointerover

        public org.htmlunit.corejs.javascript.Function getOnpointerover()
        Returns the onpointerover event handler for this element.
        Returns:
        the onpointerover event handler for this element
      • setOnpointerover

        public void setOnpointerover​(java.lang.Object onpointerover)
        Sets the onpointerover event handler for this element.
        Parameters:
        onpointerover - the onpointerover event handler for this element
      • getOnpointerup

        public org.htmlunit.corejs.javascript.Function getOnpointerup()
        Returns the onpointerup event handler for this element.
        Returns:
        the onpointerup event handler for this element
      • setOnpointerup

        public void setOnpointerup​(java.lang.Object onpointerup)
        Sets the onpointerup event handler for this element.
        Parameters:
        onpointerup - the onpointerup event handler for this element
      • getOnprogress

        public org.htmlunit.corejs.javascript.Function getOnprogress()
        Returns the onprogress event handler for this element.
        Returns:
        the onprogress event handler for this element
      • setOnprogress

        public void setOnprogress​(java.lang.Object onprogress)
        Sets the onprogress event handler for this element.
        Parameters:
        onprogress - the onprogress event handler for this element
      • getOnratechange

        public org.htmlunit.corejs.javascript.Function getOnratechange()
        Returns the onratechange event handler for this element.
        Returns:
        the onratechange event handler for this element
      • setOnratechange

        public void setOnratechange​(java.lang.Object onratechange)
        Sets the onratechange event handler for this element.
        Parameters:
        onratechange - the onratechange event handler for this element
      • getOnreadystatechange

        public org.htmlunit.corejs.javascript.Function getOnreadystatechange()
        Returns the onreadystatechange event handler for this element.
        Returns:
        the onreadystatechange event handler for this element
      • setOnreadystatechange

        public void setOnreadystatechange​(java.lang.Object onreadystatechange)
        Sets the onreadystatechange event handler for this element.
        Parameters:
        onreadystatechange - the onreadystatechange event handler for this element
      • getOnreset

        public org.htmlunit.corejs.javascript.Function getOnreset()
        Returns the onreset event handler for this element.
        Returns:
        the onreset event handler for this element
      • setOnreset

        public void setOnreset​(java.lang.Object onreset)
        Sets the onreset event handler for this element.
        Parameters:
        onreset - the onreset event handler for this element
      • getOnscroll

        public org.htmlunit.corejs.javascript.Function getOnscroll()
        Returns the onscroll event handler for this element.
        Returns:
        the onscroll event handler for this element
      • setOnscroll

        public void setOnscroll​(java.lang.Object onscroll)
        Sets the onscroll event handler for this element.
        Parameters:
        onscroll - the onscroll event handler for this element
      • getOnsearch

        public org.htmlunit.corejs.javascript.Function getOnsearch()
        Returns the onsearch event handler for this element.
        Returns:
        the onsearch event handler for this element
      • setOnsearch

        public void setOnsearch​(java.lang.Object onsearch)
        Sets the onsearch event handler for this element.
        Parameters:
        onsearch - the onsearch event handler for this element
      • getOnseeked

        public org.htmlunit.corejs.javascript.Function getOnseeked()
        Returns the onseeked event handler for this element.
        Returns:
        the onseeked event handler for this element
      • setOnseeked

        public void setOnseeked​(java.lang.Object onseeked)
        Sets the onseeked event handler for this element.
        Parameters:
        onseeked - the onseeked event handler for this element
      • getOnseeking

        public org.htmlunit.corejs.javascript.Function getOnseeking()
        Returns the onseeking event handler for this element.
        Returns:
        the onseeking event handler for this element
      • setOnseeking

        public void setOnseeking​(java.lang.Object onseeking)
        Sets the onseeking event handler for this element.
        Parameters:
        onseeking - the onseeking event handler for this element
      • getOnselect

        public org.htmlunit.corejs.javascript.Function getOnselect()
        Returns the onselect event handler for this element.
        Returns:
        the onselect event handler for this element
      • setOnselect

        public void setOnselect​(java.lang.Object onselect)
        Sets the onselect event handler for this element.
        Parameters:
        onselect - the onselect event handler for this element
      • getOnselectionchange

        public org.htmlunit.corejs.javascript.Function getOnselectionchange()
        Returns the onselectionchange event handler for this element.
        Returns:
        the onselectionchange event handler for this element
      • setOnselectionchange

        public void setOnselectionchange​(java.lang.Object onselectionchange)
        Sets the onselectionchange event handler for this element.
        Parameters:
        onselectionchange - the onselectionchange event handler for this element
      • getOnselectstart

        public org.htmlunit.corejs.javascript.Function getOnselectstart()
        Returns the onselectstart event handler for this element.
        Returns:
        the onselectstart event handler for this element
      • setOnselectstart

        public void setOnselectstart​(java.lang.Object onselectstart)
        Sets the onselectstart event handler for this element.
        Parameters:
        onselectstart - the onselectstart event handler for this element
      • getOnstalled

        public org.htmlunit.corejs.javascript.Function getOnstalled()
        Returns the onstalled event handler for this element.
        Returns:
        the onstalled event handler for this element
      • setOnstalled

        public void setOnstalled​(java.lang.Object onstalled)
        Sets the onstalled event handler for this element.
        Parameters:
        onstalled - the onstalled event handler for this element
      • getOnsubmit

        public org.htmlunit.corejs.javascript.Function getOnsubmit()
        Returns the onsubmit event handler for this element.
        Returns:
        the onsubmit event handler for this element
      • setOnsubmit

        public void setOnsubmit​(java.lang.Object onsubmit)
        Sets the onsubmit event handler for this element.
        Parameters:
        onsubmit - the onsubmit event handler for this element
      • getOnsuspend

        public org.htmlunit.corejs.javascript.Function getOnsuspend()
        Returns the onsuspend event handler for this element.
        Returns:
        the onsuspend event handler for this element
      • setOnsuspend

        public void setOnsuspend​(java.lang.Object onsuspend)
        Sets the onsuspend event handler for this element.
        Parameters:
        onsuspend - the onsuspend event handler for this element
      • getOntimeupdate

        public org.htmlunit.corejs.javascript.Function getOntimeupdate()
        Returns the ontimeupdate event handler for this element.
        Returns:
        the ontimeupdate event handler for this element
      • setOntimeupdate

        public void setOntimeupdate​(java.lang.Object ontimeupdate)
        Sets the ontimeupdate event handler for this element.
        Parameters:
        ontimeupdate - the ontimeupdate event handler for this element
      • getOntoggle

        public org.htmlunit.corejs.javascript.Function getOntoggle()
        Returns the ontoggle event handler for this element.
        Returns:
        the ontoggle event handler for this element
      • setOntoggle

        public void setOntoggle​(java.lang.Object ontoggle)
        Sets the ontoggle event handler for this element.
        Parameters:
        ontoggle - the ontoggle event handler for this element
      • getOnvolumechange

        public org.htmlunit.corejs.javascript.Function getOnvolumechange()
        Returns the onvolumechange event handler for this element.
        Returns:
        the onvolumechange event handler for this element
      • setOnvolumechange

        public void setOnvolumechange​(java.lang.Object onvolumechange)
        Sets the onvolumechange event handler for this element.
        Parameters:
        onvolumechange - the onvolumechange event handler for this element
      • getOnwaiting

        public org.htmlunit.corejs.javascript.Function getOnwaiting()
        Returns the onwaiting event handler for this element.
        Returns:
        the onwaiting event handler for this element
      • setOnwaiting

        public void setOnwaiting​(java.lang.Object onwaiting)
        Sets the onwaiting event handler for this element.
        Parameters:
        onwaiting - the onwaiting event handler for this element
      • getOnwebkitfullscreenchange

        public org.htmlunit.corejs.javascript.Function getOnwebkitfullscreenchange()
        Returns the onwebkitfullscreenchange event handler for this element.
        Returns:
        the onwebkitfullscreenchange event handler for this element
      • setOnwebkitfullscreenchange

        public void setOnwebkitfullscreenchange​(java.lang.Object onwebkitfullscreenchange)
        Sets the onwebkitfullscreenchange event handler for this element.
        Parameters:
        onwebkitfullscreenchange - the onwebkitfullscreenchange event handler for this element
      • getOnwebkitfullscreenerror

        public org.htmlunit.corejs.javascript.Function getOnwebkitfullscreenerror()
        Returns the onwebkitfullscreenerror event handler for this element.
        Returns:
        the onwebkitfullscreenerror event handler for this element
      • setOnwebkitfullscreenerror

        public void setOnwebkitfullscreenerror​(java.lang.Object onwebkitfullscreenerror)
        Sets the onwebkitfullscreenerror event handler for this element.
        Parameters:
        onwebkitfullscreenerror - the onwebkitfullscreenerror event handler for this element
      • getOnwheel

        public org.htmlunit.corejs.javascript.Function getOnwheel()
        Returns the onwheel event handler for this element.
        Returns:
        the onwheel event handler for this element
      • setOnwheel

        public void setOnwheel​(java.lang.Object onwheel)
        Sets the onwheel event handler for this element.
        Parameters:
        onwheel - the onwheel event handler for this element
      • getOnafterscriptexecute

        public org.htmlunit.corejs.javascript.Function getOnafterscriptexecute()
        Returns the onafterscriptexecute event handler for this element.
        Returns:
        the onafterscriptexecute event handler for this element
      • setOnafterscriptexecute

        public void setOnafterscriptexecute​(java.lang.Object onafterscriptexecute)
        Sets the onafterscriptexecute event handler for this element.
        Parameters:
        onafterscriptexecute - the onafterscriptexecute event handler for this element
      • getOnbeforescriptexecute

        public org.htmlunit.corejs.javascript.Function getOnbeforescriptexecute()
        Returns the onbeforescriptexecute event handler for this element.
        Returns:
        the onbeforescriptexecute event handler for this element
      • setOnbeforescriptexecute

        public void setOnbeforescriptexecute​(java.lang.Object onbeforescriptexecute)
        Sets the onbeforescriptexecute event handler for this element.
        Parameters:
        onbeforescriptexecute - the onbeforescriptexecute event handler for this element
      • getOnmozfullscreenchange

        public org.htmlunit.corejs.javascript.Function getOnmozfullscreenchange()
        Returns the onmozfullscreenchange event handler for this element.
        Returns:
        the onmozfullscreenchange event handler for this element
      • setOnmozfullscreenchange

        public void setOnmozfullscreenchange​(java.lang.Object onmozfullscreenchange)
        Sets the onmozfullscreenchange event handler for this element.
        Parameters:
        onmozfullscreenchange - the onmozfullscreenchange event handler for this element
      • getOnmozfullscreenerror

        public org.htmlunit.corejs.javascript.Function getOnmozfullscreenerror()
        Returns the onmozfullscreenerror event handler for this element.
        Returns:
        the onmozfullscreenerror event handler for this element
      • setOnmozfullscreenerror

        public void setOnmozfullscreenerror​(java.lang.Object onmozfullscreenerror)
        Sets the onmozfullscreenerror event handler for this element.
        Parameters:
        onmozfullscreenerror - the onmozfullscreenerror event 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 - the currentScript
      • getFonts

        public org.htmlunit.corejs.javascript.ScriptableObject getFonts()
        Returns:
        the FontFaceSet
      • getAll

        public HTMLCollection getAll()
        Returns the value of the all property.
        Returns:
        the value of the all property
      • getElementById

        public HtmlUnitScriptable getElementById​(java.lang.String id)
        Returns the element with the specified ID, as long as it is an HTML element; null otherwise.
        Parameters:
        id - the ID to search for
        Returns:
        the element with the specified ID, as long as it is an HTML element; null otherwise
      • createProcessingInstruction

        public java.lang.Object createProcessingInstruction​(java.lang.String target,
                                                            java.lang.String data)
        Creates a new ProcessingInstruction.
        Parameters:
        target - the target
        data - the data
        Returns:
        the new ProcessingInstruction
      • createCDATASection

        public java.lang.Object createCDATASection​(java.lang.String data)
        Creates a new createCDATASection.
        Parameters:
        data - the data
        Returns:
        the new CDATASection
      • clear

        public void clear()
        Does... nothing.
        See Also:
        Mozilla doc
      • contains

        public boolean contains​(java.lang.Object element)
        Checks whether the given element is contained within this object.
        Overrides:
        contains in class Node
        Parameters:
        element - element object that specifies the element to check
        Returns:
        true if the element is contained within this object
      • generateBlobUrl

        public java.lang.String generateBlobUrl​(Blob blob)
        Generate and return the URL for the given blob.
        Parameters:
        blob - the Blob containing the data
        Returns:
        the URL URL.createObjectURL(Object)
      • resolveBlobUrl

        public Blob resolveBlobUrl​(java.lang.String url)
        Parameters:
        url - the url to resolve
        Returns:
        the Blob for the given URL or null if not found.
      • revokeBlobUrl

        public void revokeBlobUrl​(java.lang.String url)
        Revokes the URL for the given blob.
        Parameters:
        url - the url to revoke URL.revokeObjectURL(Scriptable)