Package org.htmlunit.javascript.host.dom
Class Document
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.javascript.HtmlUnitScriptable
-
- org.htmlunit.javascript.host.event.EventTarget
-
- org.htmlunit.javascript.host.dom.Node
-
- org.htmlunit.javascript.host.dom.Document
-
- All Implemented Interfaces:
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 forDocument.- See Also:
- MSDN documentation, W3C Dom Level 1, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,Blob>blobUrl2Blobs_private java.lang.StringcompatMode_private org.htmlunit.corejs.javascript.ScriptableObjectcurrentScript_private java.lang.StringdesignMode_private intdocumentMode_private java.lang.Stringdomain_private static java.util.Set<java.lang.String>EXECUTE_CMDS_CHROMEprivate static java.util.Set<java.lang.String>EXECUTE_CMDS_FFhttps://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla#Executing_Commandsprivate FontFaceSetfonts_private DOMImplementationimplementation_private static java.lang.StringLAST_MODIFIED_DATE_FORMATThe format to use for thelastModifiedattribute.private java.lang.StringlastModified_private static org.apache.commons.logging.LogLOGprivate StyleSheetListstyleSheetList_private static java.util.Map<java.lang.String,java.lang.Class<? extends Event>>SUPPORTED_DOM2_EVENT_TYPE_MAPContains all supported DOM level 2 events.private static java.util.Map<java.lang.String,java.lang.Class<? extends Event>>SUPPORTED_DOM3_EVENT_TYPE_MAPContains all supported DOM level 3 events.private static java.util.Map<java.lang.String,java.lang.Class<? extends Event>>SUPPORTED_VENDOR_EVENT_TYPE_MAPContains all supported vendor specific events.private static java.util.regex.PatternTAG_NAME_PATTERNprivate Windowwindow_-
Fields inherited from class org.htmlunit.javascript.host.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
-
-
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.ObjectadoptNode(Node externalNode)Adopts a node from an external document.voidcaptureEvents(java.lang.String type)Does nothing special anymore.voidclear()Does...voidclose()JavaScript functionclose.booleancontains(java.lang.Object element)Checks whether the given element is contained within this object.AttrcreateAttribute(java.lang.String attributeName)Creates a new HTML attribute with the specified name.java.lang.ObjectcreateCDATASection(java.lang.String data)Creates a new createCDATASection.java.lang.ObjectcreateComment(java.lang.String comment)Creates a new Comment.java.lang.ObjectcreateDocumentFragment()Creates a new document fragment.java.lang.ObjectcreateElement(java.lang.String tagName)Creates a new element with the given tag name.java.lang.ObjectcreateElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)Creates a new HTML element with the given tag name, and name.EventcreateEvent(java.lang.String eventType)Implementation of theDocumentEventinterface'sDocumentEvent.createEvent(String)method.private static org.w3c.dom.traversal.NodeFiltercreateFilterWrapper(org.htmlunit.corejs.javascript.Scriptable filter, boolean filterFunctionOnly)NodeIteratorcreateNodeIterator(Node root, int whatToShow, org.htmlunit.corejs.javascript.Scriptable filter)Returns a new NodeIterator object.XPathNSResolvercreateNSResolver(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.ObjectcreateProcessingInstruction(java.lang.String target, java.lang.String data)Creates a new ProcessingInstruction.RangecreateRange()Creates and returns a new range.java.lang.ObjectcreateTextNode(java.lang.String newData)Create a new DOM text node with the given data.java.lang.ObjectcreateTreeWalker(Node root, double whatToShow, org.htmlunit.corejs.javascript.Scriptable filter, boolean expandEntityReferences)Creates and returns a new TreeWalker.java.lang.ObjectelementFromPoint(int x, int y)Returns the element for the specified x coordinate and the specified y coordinate.XPathResultevaluate(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.booleanexecCommand(java.lang.String cmd, boolean userInterface, java.lang.Object value)Executes a command.voidforceDocumentMode(int documentMode)INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Called from the HTMLParser if a 'X-UA-Compatible' meta tag found.java.lang.StringgenerateBlobUrl(Blob blob)Generate and return the URL for the given blob.java.lang.ObjectgetActiveElement()Returns the value of theactiveElementproperty.java.lang.StringgetAlinkColor()Returns the value of thealinkColorproperty.HTMLCollectiongetAll()Returns the value of theallproperty.java.lang.ObjectgetAnchors()Returns the value of the JavaScript propertyanchors.java.lang.ObjectgetApplets()Returns the value of the JavaScript propertyapplets.java.lang.StringgetBgColor()Returns the value of thebgColorproperty.HTMLElementgetBody()Returns this document'sbodyelement.java.lang.StringgetCharacterSet()Returns the character encoding of the current document.java.lang.StringgetCharset()Retrieves the character set used to encode the document.intgetChildElementCount()Returns the current number of child elements.HTMLCollectiongetChildren()Gets the children of the current node.java.lang.StringgetCompatMode()Returns thecompatModeproperty.java.lang.StringgetContentType()Returns thecontentTypeproperty.java.lang.StringgetCookie()Returns thecookieproperty.org.htmlunit.corejs.javascript.ScriptableObjectgetCurrentScript()java.lang.ObjectgetDefaultView()Gets the window in which this document is contained.java.lang.StringgetDesignMode()Returns a value which indicates whether or not the document can be edited.HtmlUnitScriptablegetDoctype()Gets the JavaScript propertydoctypefor the document.ElementgetDocumentElement()Gets the JavaScript propertydocumentElementfor the document.intgetDocumentMode()Returns thedocumentModeproperty.java.lang.StringgetDocumentURI()Returns the value of thedocumentURIproperty.java.lang.StringgetDomain()Returns the domain name of the server that served the document, ornullif the server cannot be identified by a domain name.HtmlUnitScriptablegetElementById(java.lang.String id)Returns the element with the specified ID, as long as it is an HTML element;nullotherwise.HTMLCollectiongetElementsByClassName(java.lang.String className)Returns all the descendant elements with the specified class name.NodeListgetElementsByName(java.lang.String elementName)Returns all HTML elements that have anameattribute with the specified value.HTMLCollectiongetElementsByTagName(java.lang.String tagName)Returns all the descendant elements with the specified tag name.java.lang.ObjectgetElementsByTagNameNS(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.ObjectgetEmbeds()Returns the value of theembedsproperty.java.lang.StringgetFgColor()Returns the value of thefgColorproperty.ElementgetFirstElementChild()Returns the first element child.org.htmlunit.corejs.javascript.ScriptableObjectgetFonts()java.lang.ObjectgetForms()Returns the value of theformsproperty.java.lang.ObjectgetHead()Returns this document'sheadelement.booleangetHidden()Returns thehiddenproperty.java.lang.ObjectgetImages()Returns the value of theembedsproperty.DOMImplementationgetImplementation()Returns the implementation object of the current document.java.lang.StringgetInputEncoding()Returns a string representing the encoding under which the document was parsed.ElementgetLastElementChild()Returns the last element child.java.lang.StringgetLastModified()Returns the last modification date of the document.java.lang.StringgetLinkColor()Returns the value of thelinkColorproperty.java.lang.ObjectgetLinks()Returns the value of the JavaScript propertylinks.LocationgetLocation()Returns the value of thelocationproperty.org.htmlunit.corejs.javascript.FunctiongetOnabort()Returns theonabortevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnafterscriptexecute()Returns theonafterscriptexecuteevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnauxclick()Returns theonauxclickevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnbeforecopy()Returns theonbeforecopyevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnbeforecut()Returns theonbeforecutevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnbeforepaste()Returns theonbeforepasteevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnbeforescriptexecute()Returns theonbeforescriptexecuteevent handler for this element.java.lang.ObjectgetOnblur()Returns theonblurevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOncancel()Returns theoncancelevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOncanplay()Returns theoncanplayevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOncanplaythrough()Returns theoncanplaythroughevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnchange()Returns theonchangeevent handler for this element.java.lang.ObjectgetOnclick()Returns theonclickevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnclose()Returns theoncloseevent handler for this element.java.lang.ObjectgetOncontextmenu()Returns theoncontextmenuevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOncopy()Returns theoncopyevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOncuechange()Returns theoncuechangeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOncut()Returns theoncutevent handler for this element.java.lang.ObjectgetOndblclick()Returns theondblclickevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOndrag()Returns theondragevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOndragend()Returns theondragendevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOndragenter()Returns theondragenterevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOndragleave()Returns theondragleaveevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOndragover()Returns theondragoverevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOndragstart()Returns theondragstartevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOndrop()Returns theondropevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOndurationchange()Returns theondurationchangeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnemptied()Returns theonemptiedevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnended()Returns theonendedevent handler for this element.java.lang.ObjectgetOnerror()Returns theonerrorevent handler for this element.java.lang.ObjectgetOnfocus()Returns theonfocusevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOngotpointercapture()Returns theongotpointercaptureevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOninput()Returns theoninputevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOninvalid()Returns theoninvalidevent handler for this element.java.lang.ObjectgetOnkeydown()Returns theonkeydownevent handler for this element.java.lang.ObjectgetOnkeypress()Returns theonkeypressevent handler for this element.java.lang.ObjectgetOnkeyup()Returns theonkeyupevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnload()Returns theonloadevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnloadeddata()Returns theonloadeddataevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnloadedmetadata()Returns theonloadedmetadataevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnloadstart()Returns theonloadstartevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnlostpointercapture()Returns theonlostpointercaptureevent handler for this element.java.lang.ObjectgetOnmousedown()Returns theonmousedownevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnmouseenter()Returns theonmouseenterevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnmouseleave()Returns theonmouseleaveevent handler for this element.java.lang.ObjectgetOnmousemove()Returns theonmousemoveevent handler for this element.java.lang.ObjectgetOnmouseout()Returns theonmouseoutevent handler for this element.java.lang.ObjectgetOnmouseover()Returns theonmouseoverevent handler for this element.java.lang.ObjectgetOnmouseup()Returns theonmouseupevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnmousewheel()Returns theonmousewheelevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnmozfullscreenchange()Returns theonmozfullscreenchangeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnmozfullscreenerror()Returns theonmozfullscreenerrorevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpaste()Returns theonpasteevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpause()Returns theonpauseevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnplay()Returns theonplayevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnplaying()Returns theonplayingevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpointercancel()Returns theonpointercancelevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpointerdown()Returns theonpointerdownevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpointerenter()Returns theonpointerenterevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpointerleave()Returns theonpointerleaveevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpointerlockchange()Returns theonpointerlockchangeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpointerlockerror()Returns theonpointerlockerrorevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpointermove()Returns theonpointermoveevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpointerout()Returns theonpointeroutevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpointerover()Returns theonpointeroverevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnpointerup()Returns theonpointerupevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnprogress()Returns theonprogressevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnratechange()Returns theonratechangeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnreadystatechange()Returns theonreadystatechangeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnreset()Returns theonresetevent handler for this element.java.lang.ObjectgetOnresize()Returns theonresizeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnscroll()Returns theonscrollevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnsearch()Returns theonsearchevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnseeked()Returns theonseekedevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnseeking()Returns theonseekingevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnselect()Returns theonselectevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnselectionchange()Returns theonselectionchangeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnselectstart()Returns theonselectstartevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnstalled()Returns theonstalledevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnsubmit()Returns theonsubmitevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnsuspend()Returns theonsuspendevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOntimeupdate()Returns theontimeupdateevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOntoggle()Returns theontoggleevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnvolumechange()Returns theonvolumechangeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnwaiting()Returns theonwaitingevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnwebkitfullscreenchange()Returns theonwebkitfullscreenchangeevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnwebkitfullscreenerror()Returns theonwebkitfullscreenerrorevent handler for this element.org.htmlunit.corejs.javascript.FunctiongetOnwheel()Returns theonwheelevent handler for this element.SgmlPagegetPage()Returns the page that this document is modeling.java.lang.ObjectgetPlugins()Returns the value of thepluginsproperty.java.lang.StringgetReadyState()Returns the ready state of the document.java.lang.StringgetReferrer()Returns the value of thereferrerproperty.ElementgetRootElement()Gets the JavaScript propertyrootElement.java.lang.ObjectgetScripts()Returns the value of thescriptsproperty.SelectiongetSelection()Returns the current selection.StyleSheetListgetStyleSheets()Retrieves a collection of stylesheet objects representing the style sheets that correspond to each instance of a Link orCSSStyleDeclarationobject in the document.java.lang.StringgetTitle()Returns this document's title.java.lang.StringgetURL_js()Returns the value of theURLproperty.java.lang.StringgetVlinkColor()Returns the value of thevlinkColorproperty.java.lang.StringgetXmlEncoding()Returns thexmlEncodingproperty.java.lang.StringgetXmlVersion()Returns thexmlVersionproperty.private booleanhasCommand(java.lang.String cmd, boolean includeBold)booleanhasFocus()Returnsfalseif the active element in the document has no focus;trueif the active element in the document has focus.HtmlUnitScriptableimportNode(Node importedNode, boolean deep)Imports a node from another document to this document.private booleanisQuirksDocType()booleanisXmlStandalone()Returns thexmlStandaloneproperty.voidjsConstructor()JavaScript constructor.private static java.util.DateparseDateOrNow(java.lang.String stringDate)booleanqueryCommandEnabled(java.lang.String cmd)Indicates if the command can be successfully executed usingexecCommand, given the current state of the document.booleanqueryCommandSupported(java.lang.String cmd)Indicates if the command is supported.NodequerySelector(java.lang.String selectors)Returns the first element within the document that matches the specified group of selectors.NodeListquerySelectorAll(java.lang.String selectors)Retrieves all element nodes from descendants of the starting element node that match any selector within the supplied selector strings.voidreleaseCapture()Mock for the moment.voidreleaseEvents(java.lang.String type)Does nothing special anymore.BlobresolveBlobUrl(java.lang.String url)voidrevokeBlobUrl(java.lang.String url)Revokes the URL for the given blob.voidsetAlinkColor(java.lang.String color)Sets the value of thealinkColorproperty.voidsetBgColor(java.lang.String color)Sets the value of thebgColorproperty.voidsetBody(HTMLElement htmlElement)Sets thebodyelement of the document.voidsetCurrentScript(org.htmlunit.corejs.javascript.ScriptableObject script)voidsetDesignMode(java.lang.String mode)Sets a value which indicates whether or not the document can be edited.voidsetDomain(java.lang.String newDomain)Sets the domain of this document.voidsetFgColor(java.lang.String color)Sets the value of thefgColorproperty.voidsetLinkColor(java.lang.String color)Sets the value of thelinkColorproperty.voidsetLocation(java.lang.String location)Sets the value of thelocationproperty.voidsetOnabort(java.lang.Object onabort)Sets theonabortevent handler for this element.voidsetOnafterscriptexecute(java.lang.Object onafterscriptexecute)Sets theonafterscriptexecuteevent handler for this element.voidsetOnauxclick(java.lang.Object onauxclick)Sets theonauxclickevent handler for this element.voidsetOnbeforecopy(java.lang.Object onbeforecopy)Sets theonbeforecopyevent handler for this element.voidsetOnbeforecut(java.lang.Object onbeforecut)Sets theonbeforecutevent handler for this element.voidsetOnbeforepaste(java.lang.Object onbeforepaste)Sets theonbeforepasteevent handler for this element.voidsetOnbeforescriptexecute(java.lang.Object onbeforescriptexecute)Sets theonbeforescriptexecuteevent handler for this element.voidsetOnblur(java.lang.Object handler)Sets theonblurevent handler for this element.voidsetOncancel(java.lang.Object oncancel)Sets theoncancelevent handler for this element.voidsetOncanplay(java.lang.Object oncanplay)Sets theoncanplayevent handler for this element.voidsetOncanplaythrough(java.lang.Object oncanplaythrough)Sets theoncanplaythroughevent handler for this element.voidsetOnchange(java.lang.Object onchange)Sets theonchangeevent handler for this element.voidsetOnclick(java.lang.Object handler)Sets theonclickevent handler for this element.voidsetOnclose(java.lang.Object onclose)Sets theoncloseevent handler for this element.voidsetOncontextmenu(java.lang.Object handler)Sets theoncontextmenuevent handler for this element.voidsetOncopy(java.lang.Object oncopy)Sets theoncopyevent handler for this element.voidsetOncuechange(java.lang.Object oncuechange)Sets theoncuechangeevent handler for this element.voidsetOncut(java.lang.Object oncut)Sets theoncutevent handler for this element.voidsetOndblclick(java.lang.Object handler)Sets theondblclickevent handler for this element.voidsetOndrag(java.lang.Object ondrag)Sets theondragevent handler for this element.voidsetOndragend(java.lang.Object ondragend)Sets theondragendevent handler for this element.voidsetOndragenter(java.lang.Object ondragenter)Sets theondragenterevent handler for this element.voidsetOndragleave(java.lang.Object ondragleave)Sets theondragleaveevent handler for this element.voidsetOndragover(java.lang.Object ondragover)Sets theondragoverevent handler for this element.voidsetOndragstart(java.lang.Object ondragstart)Sets theondragstartevent handler for this element.voidsetOndrop(java.lang.Object ondrop)Sets theondropevent handler for this element.voidsetOndurationchange(java.lang.Object ondurationchange)Sets theondurationchangeevent handler for this element.voidsetOnemptied(java.lang.Object onemptied)Sets theonemptiedevent handler for this element.voidsetOnended(java.lang.Object onended)Sets theonendedevent handler for this element.voidsetOnerror(java.lang.Object handler)Sets theonerrorevent handler for this element.voidsetOnfocus(java.lang.Object handler)Sets theonfocusevent handler for this element.voidsetOngotpointercapture(java.lang.Object ongotpointercapture)Sets theongotpointercaptureevent handler for this element.voidsetOninput(java.lang.Object oninput)Sets theoninputevent handler for this element.voidsetOninvalid(java.lang.Object oninvalid)Sets theoninvalidevent handler for this element.voidsetOnkeydown(java.lang.Object handler)Sets theonkeydownevent handler for this element.voidsetOnkeypress(java.lang.Object handler)Sets theonkeypressevent handler for this element.voidsetOnkeyup(java.lang.Object handler)Sets theonkeyupevent handler for this element.voidsetOnload(java.lang.Object onload)Sets theonloadevent handler for this element.voidsetOnloadeddata(java.lang.Object onloadeddata)Sets theonloadeddataevent handler for this element.voidsetOnloadedmetadata(java.lang.Object onloadedmetadata)Sets theonloadedmetadataevent handler for this element.voidsetOnloadstart(java.lang.Object onloadstart)Sets theonloadstartevent handler for this element.voidsetOnlostpointercapture(java.lang.Object onlostpointercapture)Sets theonlostpointercaptureevent handler for this element.voidsetOnmousedown(java.lang.Object handler)Sets theonmousedownevent handler for this element.voidsetOnmouseenter(java.lang.Object onmouseenter)Sets theonmouseenterevent handler for this element.voidsetOnmouseleave(java.lang.Object onmouseleave)Sets theonmouseleaveevent handler for this element.voidsetOnmousemove(java.lang.Object handler)Sets theonmousemoveevent handler for this element.voidsetOnmouseout(java.lang.Object handler)Sets theonmouseoutevent handler for this element.voidsetOnmouseover(java.lang.Object handler)Sets theonmouseoverevent handler for this element.voidsetOnmouseup(java.lang.Object handler)Sets theonmouseupevent handler for this element.voidsetOnmousewheel(java.lang.Object onmousewheel)Sets theonmousewheelevent handler for this element.voidsetOnmozfullscreenchange(java.lang.Object onmozfullscreenchange)Sets theonmozfullscreenchangeevent handler for this element.voidsetOnmozfullscreenerror(java.lang.Object onmozfullscreenerror)Sets theonmozfullscreenerrorevent handler for this element.voidsetOnpaste(java.lang.Object onpaste)Sets theonpasteevent handler for this element.voidsetOnpause(java.lang.Object onpause)Sets theonpauseevent handler for this element.voidsetOnplay(java.lang.Object onplay)Sets theonplayevent handler for this element.voidsetOnplaying(java.lang.Object onplaying)Sets theonplayingevent handler for this element.voidsetOnpointercancel(java.lang.Object onpointercancel)Sets theonpointercancelevent handler for this element.voidsetOnpointerdown(java.lang.Object onpointerdown)Sets theonpointerdownevent handler for this element.voidsetOnpointerenter(java.lang.Object onpointerenter)Sets theonpointerenterevent handler for this element.voidsetOnpointerleave(java.lang.Object onpointerleave)Sets theonpointerleaveevent handler for this element.voidsetOnpointerlockchange(java.lang.Object onpointerlockchange)Sets theonpointerlockchangeevent handler for this element.voidsetOnpointerlockerror(java.lang.Object onpointerlockerror)Sets theonpointerlockerrorevent handler for this element.voidsetOnpointermove(java.lang.Object onpointermove)Sets theonpointermoveevent handler for this element.voidsetOnpointerout(java.lang.Object onpointerout)Sets theonpointeroutevent handler for this element.voidsetOnpointerover(java.lang.Object onpointerover)Sets theonpointeroverevent handler for this element.voidsetOnpointerup(java.lang.Object onpointerup)Sets theonpointerupevent handler for this element.voidsetOnprogress(java.lang.Object onprogress)Sets theonprogressevent handler for this element.voidsetOnratechange(java.lang.Object onratechange)Sets theonratechangeevent handler for this element.voidsetOnreadystatechange(java.lang.Object onreadystatechange)Sets theonreadystatechangeevent handler for this element.voidsetOnreset(java.lang.Object onreset)Sets theonresetevent handler for this element.voidsetOnresize(java.lang.Object handler)Sets theonresizeevent handler for this element.voidsetOnscroll(java.lang.Object onscroll)Sets theonscrollevent handler for this element.voidsetOnsearch(java.lang.Object onsearch)Sets theonsearchevent handler for this element.voidsetOnseeked(java.lang.Object onseeked)Sets theonseekedevent handler for this element.voidsetOnseeking(java.lang.Object onseeking)Sets theonseekingevent handler for this element.voidsetOnselect(java.lang.Object onselect)Sets theonselectevent handler for this element.voidsetOnselectionchange(java.lang.Object onselectionchange)Sets theonselectionchangeevent handler for this element.voidsetOnselectstart(java.lang.Object onselectstart)Sets theonselectstartevent handler for this element.voidsetOnstalled(java.lang.Object onstalled)Sets theonstalledevent handler for this element.voidsetOnsubmit(java.lang.Object onsubmit)Sets theonsubmitevent handler for this element.voidsetOnsuspend(java.lang.Object onsuspend)Sets theonsuspendevent handler for this element.voidsetOntimeupdate(java.lang.Object ontimeupdate)Sets theontimeupdateevent handler for this element.voidsetOntoggle(java.lang.Object ontoggle)Sets theontoggleevent handler for this element.voidsetOnvolumechange(java.lang.Object onvolumechange)Sets theonvolumechangeevent handler for this element.voidsetOnwaiting(java.lang.Object onwaiting)Sets theonwaitingevent handler for this element.voidsetOnwebkitfullscreenchange(java.lang.Object onwebkitfullscreenchange)Sets theonwebkitfullscreenchangeevent handler for this element.voidsetOnwebkitfullscreenerror(java.lang.Object onwebkitfullscreenerror)Sets theonwebkitfullscreenerrorevent handler for this element.voidsetOnwheel(java.lang.Object onwheel)Sets theonwheelevent handler for this element.voidsetTitle(java.lang.String title)Sets this document's title.voidsetVlinkColor(java.lang.String color)Sets the value of thevlinkColorproperty.voidsetWindow(Window window)Sets the Window JavaScript object that encloses this document.private static org.htmlunit.corejs.javascript.ScriptablestaticGetPrototype(Window window, java.lang.Class<? extends HtmlUnitScriptable> javaScriptClass)-
Methods inherited from class org.htmlunit.javascript.host.dom.Node
after, append, appendChild, before, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFirstChild, getJavaScriptNode, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParent, getParentElement, getParentNode, getPrefix, getPreviousSibling, getRootNode, getTextContent, hasAttributes, hasChildNodes, insertBefore, insertBeforeImpl, isEqualNode, isSameNode, normalize, prepend, remove, removeChild, replaceChild, replaceChildren, replaceWith, setNodeValue, setTextContent
-
Methods inherited from class org.htmlunit.javascript.host.event.EventTarget
addEventListener, clearEventListenersContainer, dispatchEvent, executeEventLocally, fireEvent, getEventHandler, getEventListenersContainer, hasEventHandlers, isEventHandlerOnWindow, removeEventListener, setEventHandler
-
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setParentScope, setupPromise, setupRejectedPromise
-
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
-
-
-
-
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 thelastModifiedattribute.- 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_
-
implementation_
private DOMImplementation implementation_
-
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_
-
fonts_
private transient FontFaceSet fonts_
-
styleSheetList_
private transient StyleSheetList styleSheetList_
-
blobUrl2Blobs_
private final java.util.Map<java.lang.String,Blob> blobUrl2Blobs_
-
-
Method Detail
-
jsConstructor
public void jsConstructor()
JavaScript constructor.- Overrides:
jsConstructorin classNode
-
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 thelocationproperty.- Returns:
- the value of the
locationproperty
-
setLocation
public void setLocation(java.lang.String location) throws java.io.IOExceptionSets the value of thelocationproperty. The location's default property is "href", so setting "document.location='http://www.sf.net'" is equivalent to setting "document.location.href='http://www.sf.net'".- Parameters:
location- the location to navigate to- Throws:
java.io.IOException- when location loading fails- See Also:
- MSDN documentation
-
getReferrer
public java.lang.String getReferrer()
Returns the value of thereferrerproperty.- Returns:
- the value of the
referrerproperty
-
getDocumentElement
public Element getDocumentElement()
Gets the JavaScript propertydocumentElementfor the document.- Returns:
- the root node for the document
-
getRootElement
public Element getRootElement()
Gets the JavaScript propertyrootElement.- Returns:
- the root node for the document
-
getDoctype
public HtmlUnitScriptable getDoctype()
Gets the JavaScript propertydoctypefor 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 importdeep- 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 evaluatedcontextNode- the context node for the evaluation of this XPath expressionresolver- the resolver permits translation of all prefixes, including the XML namespace prefix, within the XPath expression into appropriate namespace URIs.type- If a specific type is specified, then the result will be returned as the corresponding typeresult- the result object which may be reused and returned by this method- Returns:
- the result of the evaluation of the XPath expression
-
createElement
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 namespacequalifiedName- the qualified name of the element type to instantiate- Returns:
- the new HTML element, or NOT_FOUND if the tag is not supported
-
getElementsByTagName
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 forlocalName- is either the local name of elements to look for or the special value "*", which matches all elements.- Returns:
- a live NodeList of found elements in the order they appear in the tree
-
getActiveElement
public java.lang.Object getActiveElement()
Returns the value of theactiveElementproperty.- Returns:
- the value of the
activeElementproperty - 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 propertyanchors.- Returns:
- the value of this property
- See Also:
- MSDN documentation, Gecko DOM reference
-
getApplets
public java.lang.Object getApplets()
Returns the value of the JavaScript propertyapplets.- Returns:
- the value of this property
- See Also:
- MSDN documentation, Gecko DOM reference
-
getBody
public HTMLElement getBody()
Returns this document'sbodyelement.- Returns:
- this document's
bodyelement
-
setBody
public void setBody(HTMLElement htmlElement)
Sets thebodyelement of the document.- Parameters:
htmlElement- the new html element
-
close
public void close() throws java.io.IOExceptionJavaScript functionclose.See http://www.whatwg.org/specs/web-apps/current-work/multipage/section-dynamic.html for a good description of the semantics of open(), write(), writeln() and close().
- Throws:
java.io.IOException- if an IO problem occurs
-
getCompatMode
public java.lang.String getCompatMode()
Returns thecompatModeproperty.- Returns:
- the
compatModeproperty
-
getDocumentMode
public int getDocumentMode()
Returns thedocumentModeproperty.- Returns:
- the
documentModeproperty
-
isQuirksDocType
private boolean isQuirksDocType()
-
forceDocumentMode
public void forceDocumentMode(int documentMode)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Called from the HTMLParser if a 'X-UA-Compatible' meta tag found.- Parameters:
documentMode- the mode forced by the meta tag
-
querySelector
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:
trueif 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 usingexecCommand, given the current state of the document.- Parameters:
cmd- the command identifier- Returns:
trueif 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 identifieruserInterface- display a user interface if the command supports onevalue- the string, number, or other value to assign (possible values depend on the command)- Returns:
trueif the command was successful,falseotherwise- See Also:
- MSDN documentation
-
getURL_js
public java.lang.String getURL_js()
Returns the value of theURLproperty.- Returns:
- the value of the
URLproperty
-
getDocumentURI
public java.lang.String getDocumentURI()
Returns the value of thedocumentURIproperty.- Returns:
- the value of the
documentURIproperty
-
getCookie
public java.lang.String getCookie()
Returns thecookieproperty.- Returns:
- the
cookieproperty
-
createEvent
public Event createEvent(java.lang.String eventType) throws org.w3c.dom.DOMException
Implementation of theDocumentEventinterface'sDocumentEvent.createEvent(String)method. The method creates an uninitialized event of the specified type.- Parameters:
eventType- the event type to create- Returns:
- an event object for the specified type
- Throws:
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 ofNodeFilterfilter- an object implementing theNodeFilterinterface- Returns:
- a new NodeIterator object
-
createFilterWrapper
private static org.w3c.dom.traversal.NodeFilter createFilterWrapper(org.htmlunit.corejs.javascript.Scriptable filter, boolean filterFunctionOnly)
-
createTreeWalker
public 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
NodeFilterfor the set of possible Show_ values. - JavaScript param 3: The
NodeFilterto be used with this TreeWalker, ornullto indicate no filter. - JavaScript param 4: If
false, the contents of EntityReference nodes are not present in the logical view.
- Parameters:
root- the node which will serve as the root for the TreeWalkerwhatToShow- specifies which node types may appear in the logical view of the tree presentedfilter- the NodeFilter to be used with this TreeWalker, or null to indicate no filterexpandEntityReferences- If false, the contents of EntityReference nodes are not presented in the logical view- Returns:
- a new TreeWalker
- Throws:
org.w3c.dom.DOMException- on attempt to create a TreeWalker with a root that isnull- See Also:
- DOM-Level-2-Traversal-Range
- JavaScript param 1: The root node of the TreeWalker. Must not be
-
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, ornullif 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:
- If the newDomain.equalsIgnoreCase(currentDomain) the method returns with no error.
- If the browser version is netscape, the newDomain is downshifted.
- The change will take place if and only if the suffixes of the
current domain and the new domain match AND there are at least
two domain qualifiers e.g. the following transformations are legal
d1.d2.d3.gargoylesoftware.com may be transformed to itself or:
d2.d3.gargoylesoftware.com
d3.gargoylesoftware.com
gargoylesoftware.com
transformation to: com will fail
TODO This code could be modified to understand country domain suffixes. The domain www.bbc.co.uk should be trimmable only down to bbc.co.uk trimming to co.uk should not be possible.
- Parameters:
newDomain- the new domain to set
-
setOnclick
public void setOnclick(java.lang.Object handler)
Sets theonclickevent handler for this element.- Parameters:
handler- theonclickevent handler for this element
-
getOnclick
public java.lang.Object getOnclick()
Returns theonclickevent handler for this element.- Returns:
- the
onclickevent handler for this element
-
setOndblclick
public void setOndblclick(java.lang.Object handler)
Sets theondblclickevent handler for this element.- Parameters:
handler- theondblclickevent handler for this element
-
getOndblclick
public java.lang.Object getOndblclick()
Returns theondblclickevent handler for this element.- Returns:
- the
ondblclickevent handler for this element
-
setOnblur
public void setOnblur(java.lang.Object handler)
Sets theonblurevent handler for this element.- Parameters:
handler- theonblurevent handler for this element
-
getOnblur
public java.lang.Object getOnblur()
Returns theonblurevent handler for this element.- Returns:
- the
onblurevent handler for this element
-
setOnfocus
public void setOnfocus(java.lang.Object handler)
Sets theonfocusevent handler for this element.- Parameters:
handler- theonfocusevent handler for this element
-
getOnfocus
public java.lang.Object getOnfocus()
Returns theonfocusevent handler for this element.- Returns:
- the
onfocusevent handler for this element
-
setOnkeydown
public void setOnkeydown(java.lang.Object handler)
Sets theonkeydownevent handler for this element.- Parameters:
handler- theonkeydownevent handler for this element
-
getOnkeydown
public java.lang.Object getOnkeydown()
Returns theonkeydownevent handler for this element.- Returns:
- the
onkeydownevent handler for this element
-
setOnkeypress
public void setOnkeypress(java.lang.Object handler)
Sets theonkeypressevent handler for this element.- Parameters:
handler- theonkeypressevent handler for this element
-
getOnkeypress
public java.lang.Object getOnkeypress()
Returns theonkeypressevent handler for this element.- Returns:
- the
onkeypressevent handler for this element
-
setOnkeyup
public void setOnkeyup(java.lang.Object handler)
Sets theonkeyupevent handler for this element.- Parameters:
handler- theonkeyupevent handler for this element
-
getOnkeyup
public java.lang.Object getOnkeyup()
Returns theonkeyupevent handler for this element.- Returns:
- the
onkeyupevent handler for this element
-
setOnmousedown
public void setOnmousedown(java.lang.Object handler)
Sets theonmousedownevent handler for this element.- Parameters:
handler- theonmousedownevent handler for this element
-
getOnmousedown
public java.lang.Object getOnmousedown()
Returns theonmousedownevent handler for this element.- Returns:
- the
onmousedownevent handler for this element
-
setOnmousemove
public void setOnmousemove(java.lang.Object handler)
Sets theonmousemoveevent handler for this element.- Parameters:
handler- theonmousemoveevent handler for this element
-
getOnmousemove
public java.lang.Object getOnmousemove()
Returns theonmousemoveevent handler for this element.- Returns:
- the
onmousemoveevent handler for this element
-
setOnmouseout
public void setOnmouseout(java.lang.Object handler)
Sets theonmouseoutevent handler for this element.- Parameters:
handler- theonmouseoutevent handler for this element
-
getOnmouseout
public java.lang.Object getOnmouseout()
Returns theonmouseoutevent handler for this element.- Returns:
- the
onmouseoutevent handler for this element
-
setOnmouseover
public void setOnmouseover(java.lang.Object handler)
Sets theonmouseoverevent handler for this element.- Parameters:
handler- theonmouseoverevent handler for this element
-
getOnmouseover
public java.lang.Object getOnmouseover()
Returns theonmouseoverevent handler for this element.- Returns:
- the
onmouseoverevent handler for this element
-
setOnmouseup
public void setOnmouseup(java.lang.Object handler)
Sets theonmouseupevent handler for this element.- Parameters:
handler- theonmouseupevent handler for this element
-
getOnmouseup
public java.lang.Object getOnmouseup()
Returns theonmouseupevent handler for this element.- Returns:
- the
onmouseupevent handler for this element
-
setOncontextmenu
public void setOncontextmenu(java.lang.Object handler)
Sets theoncontextmenuevent handler for this element.- Parameters:
handler- theoncontextmenuevent handler for this element
-
getOncontextmenu
public java.lang.Object getOncontextmenu()
Returns theoncontextmenuevent handler for this element.- Returns:
- the
oncontextmenuevent handler for this element
-
setOnresize
public void setOnresize(java.lang.Object handler)
Sets theonresizeevent handler for this element.- Parameters:
handler- theonresizeevent handler for this element
-
getOnresize
public java.lang.Object getOnresize()
Returns theonresizeevent handler for this element.- Returns:
- the
onresizeevent handler for this element
-
setOnerror
public void setOnerror(java.lang.Object handler)
Sets theonerrorevent handler for this element.- Parameters:
handler- theonerrorevent handler for this element
-
getOnerror
public java.lang.Object getOnerror()
Returns theonerrorevent handler for this element.- Returns:
- the
onerrorevent handler for this element
-
getOninput
public org.htmlunit.corejs.javascript.Function getOninput()
Returns theoninputevent handler for this element.- Returns:
- the
oninputevent handler for this element
-
setOninput
public void setOninput(java.lang.Object oninput)
Sets theoninputevent handler for this element.- Parameters:
oninput- theoninputevent handler for this element
-
getHidden
public boolean getHidden()
Returns thehiddenproperty.- Returns:
- the
hiddenproperty
-
getChildElementCount
public int getChildElementCount()
Returns the current number of child elements.- Overrides:
getChildElementCountin classNode- Returns:
- the child element count
-
elementFromPoint
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 pixelsy- 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 theformsproperty.- Returns:
- the value of the
formsproperty
-
getEmbeds
public java.lang.Object getEmbeds()
Returns the value of theembedsproperty.- Returns:
- the value of the
embedsproperty
-
getImages
public java.lang.Object getImages()
Returns the value of theembedsproperty.- Returns:
- the value of the
embedsproperty
-
getScripts
public java.lang.Object getScripts()
Returns the value of thescriptsproperty.- Returns:
- the value of the
scriptsproperty
-
getStyleSheets
public StyleSheetList getStyleSheets()
Retrieves a collection of stylesheet objects representing the style sheets that correspond to each instance of a Link orCSSStyleDeclarationobject in the document.- Returns:
- styleSheet collection
-
getPlugins
public java.lang.Object getPlugins()
Returns the value of thepluginsproperty.- Returns:
- the value of the
pluginsproperty
-
getLinks
public java.lang.Object getLinks()
Returns the value of the JavaScript propertylinks. 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 anameattribute with the specified value.Refer to The DOM spec for details.
- Parameters:
elementName- - value of thenameattribute to look for- Returns:
- all HTML elements that have a
nameattribute with the specified value
-
hasFocus
public boolean hasFocus()
Returnsfalseif the active element in the document has no focus;trueif the active element in the document has focus.- Returns:
- whether the active element in the document has focus or not
-
getTitle
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
-
getChildren
public HTMLCollection getChildren()
Gets the children of the current node.- Overrides:
getChildrenin classNode- Returns:
- the child at the given position
- See Also:
- MSDN documentation
-
getContentType
public java.lang.String getContentType()
Returns thecontentTypeproperty.- Returns:
- the
contentTypeproperty
-
getSelection
public Selection getSelection()
Returns the current selection.- Returns:
- the current selection
-
getHead
public java.lang.Object getHead()
Returns this document'sheadelement.- Returns:
- this document's
headelement
-
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.
-
getReadyState
public java.lang.String getReadyState()
Returns the ready state of the document.- Returns:
- the ready state of the document
- See Also:
DomNode.READY_STATE_UNINITIALIZED,DomNode.READY_STATE_LOADING,DomNode.READY_STATE_LOADED,DomNode.READY_STATE_INTERACTIVE,DomNode.READY_STATE_COMPLETE
-
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 thealinkColorproperty.- Returns:
- the value of the
alinkColorproperty
-
setAlinkColor
public void setAlinkColor(java.lang.String color)
Sets the value of thealinkColorproperty.- Parameters:
color- the value of thealinkColorproperty
-
getBgColor
public java.lang.String getBgColor()
Returns the value of thebgColorproperty.- Returns:
- the value of the
bgColorproperty - See Also:
- MSDN Documentation
-
setBgColor
public void setBgColor(java.lang.String color)
Sets the value of thebgColorproperty.- Parameters:
color- the value of thebgColorproperty- See Also:
- MSDN Documentation
-
getFgColor
public java.lang.String getFgColor()
Returns the value of thefgColorproperty.- Returns:
- the value of the
fgColorproperty
-
setFgColor
public void setFgColor(java.lang.String color)
Sets the value of thefgColorproperty.- Parameters:
color- the value of thefgColorproperty
-
getLinkColor
public java.lang.String getLinkColor()
Returns the value of thelinkColorproperty.- Returns:
- the value of the
linkColorproperty
-
setLinkColor
public void setLinkColor(java.lang.String color)
Sets the value of thelinkColorproperty.- Parameters:
color- the value of thelinkColorproperty
-
getVlinkColor
public java.lang.String getVlinkColor()
Returns the value of thevlinkColorproperty.- Returns:
- the value of the
vlinkColorproperty
-
setVlinkColor
public void setVlinkColor(java.lang.String color)
Sets the value of thevlinkColorproperty.- Parameters:
color- the value of thevlinkColorproperty
-
getLastElementChild
public Element getLastElementChild()
Returns the last element child.- Overrides:
getLastElementChildin classNode- Returns:
- the last element child
-
getFirstElementChild
public Element getFirstElementChild()
Returns the first element child.- Overrides:
getFirstElementChildin classNode- Returns:
- the first element child
-
getXmlEncoding
public java.lang.String getXmlEncoding()
Returns thexmlEncodingproperty.- Returns:
- the
xmlEncodingproperty
-
isXmlStandalone
public boolean isXmlStandalone()
Returns thexmlStandaloneproperty.- Returns:
- the
xmlStandaloneproperty
-
getXmlVersion
public java.lang.String getXmlVersion()
Returns thexmlVersionproperty.- Returns:
- the
xmlVersionproperty
-
getOnabort
public org.htmlunit.corejs.javascript.Function getOnabort()
Returns theonabortevent handler for this element.- Returns:
- the
onabortevent handler for this element
-
setOnabort
public void setOnabort(java.lang.Object onabort)
Sets theonabortevent handler for this element.- Parameters:
onabort- theonabortevent handler for this element
-
getOnauxclick
public org.htmlunit.corejs.javascript.Function getOnauxclick()
Returns theonauxclickevent handler for this element.- Returns:
- the
onauxclickevent handler for this element
-
setOnauxclick
public void setOnauxclick(java.lang.Object onauxclick)
Sets theonauxclickevent handler for this element.- Parameters:
onauxclick- theonauxclickevent handler for this element
-
getOnbeforecopy
public org.htmlunit.corejs.javascript.Function getOnbeforecopy()
Returns theonbeforecopyevent handler for this element.- Returns:
- the
onbeforecopyevent handler for this element
-
setOnbeforecopy
public void setOnbeforecopy(java.lang.Object onbeforecopy)
Sets theonbeforecopyevent handler for this element.- Parameters:
onbeforecopy- theonbeforecopyevent handler for this element
-
getOnbeforecut
public org.htmlunit.corejs.javascript.Function getOnbeforecut()
Returns theonbeforecutevent handler for this element.- Returns:
- the
onbeforecutevent handler for this element
-
setOnbeforecut
public void setOnbeforecut(java.lang.Object onbeforecut)
Sets theonbeforecutevent handler for this element.- Parameters:
onbeforecut- theonbeforecutevent handler for this element
-
getOnbeforepaste
public org.htmlunit.corejs.javascript.Function getOnbeforepaste()
Returns theonbeforepasteevent handler for this element.- Returns:
- the
onbeforepasteevent handler for this element
-
setOnbeforepaste
public void setOnbeforepaste(java.lang.Object onbeforepaste)
Sets theonbeforepasteevent handler for this element.- Parameters:
onbeforepaste- theonbeforepasteevent handler for this element
-
getOncancel
public org.htmlunit.corejs.javascript.Function getOncancel()
Returns theoncancelevent handler for this element.- Returns:
- the
oncancelevent handler for this element
-
setOncancel
public void setOncancel(java.lang.Object oncancel)
Sets theoncancelevent handler for this element.- Parameters:
oncancel- theoncancelevent handler for this element
-
getOncanplay
public org.htmlunit.corejs.javascript.Function getOncanplay()
Returns theoncanplayevent handler for this element.- Returns:
- the
oncanplayevent handler for this element
-
setOncanplay
public void setOncanplay(java.lang.Object oncanplay)
Sets theoncanplayevent handler for this element.- Parameters:
oncanplay- theoncanplayevent handler for this element
-
getOncanplaythrough
public org.htmlunit.corejs.javascript.Function getOncanplaythrough()
Returns theoncanplaythroughevent handler for this element.- Returns:
- the
oncanplaythroughevent handler for this element
-
setOncanplaythrough
public void setOncanplaythrough(java.lang.Object oncanplaythrough)
Sets theoncanplaythroughevent handler for this element.- Parameters:
oncanplaythrough- theoncanplaythroughevent handler for this element
-
getOnchange
public org.htmlunit.corejs.javascript.Function getOnchange()
Returns theonchangeevent handler for this element.- Returns:
- the
onchangeevent handler for this element
-
setOnchange
public void setOnchange(java.lang.Object onchange)
Sets theonchangeevent handler for this element.- Parameters:
onchange- theonchangeevent handler for this element
-
getOnclose
public org.htmlunit.corejs.javascript.Function getOnclose()
Returns theoncloseevent handler for this element.- Returns:
- the
oncloseevent handler for this element
-
setOnclose
public void setOnclose(java.lang.Object onclose)
Sets theoncloseevent handler for this element.- Parameters:
onclose- theoncloseevent handler for this element
-
getOncopy
public org.htmlunit.corejs.javascript.Function getOncopy()
Returns theoncopyevent handler for this element.- Returns:
- the
oncopyevent handler for this element
-
setOncopy
public void setOncopy(java.lang.Object oncopy)
Sets theoncopyevent handler for this element.- Parameters:
oncopy- theoncopyevent handler for this element
-
getOncuechange
public org.htmlunit.corejs.javascript.Function getOncuechange()
Returns theoncuechangeevent handler for this element.- Returns:
- the
oncuechangeevent handler for this element
-
setOncuechange
public void setOncuechange(java.lang.Object oncuechange)
Sets theoncuechangeevent handler for this element.- Parameters:
oncuechange- theoncuechangeevent handler for this element
-
getOncut
public org.htmlunit.corejs.javascript.Function getOncut()
Returns theoncutevent handler for this element.- Returns:
- the
oncutevent handler for this element
-
setOncut
public void setOncut(java.lang.Object oncut)
Sets theoncutevent handler for this element.- Parameters:
oncut- theoncutevent handler for this element
-
getOndrag
public org.htmlunit.corejs.javascript.Function getOndrag()
Returns theondragevent handler for this element.- Returns:
- the
ondragevent handler for this element
-
setOndrag
public void setOndrag(java.lang.Object ondrag)
Sets theondragevent handler for this element.- Parameters:
ondrag- theondragevent handler for this element
-
getOndragend
public org.htmlunit.corejs.javascript.Function getOndragend()
Returns theondragendevent handler for this element.- Returns:
- the
ondragendevent handler for this element
-
setOndragend
public void setOndragend(java.lang.Object ondragend)
Sets theondragendevent handler for this element.- Parameters:
ondragend- theondragendevent handler for this element
-
getOndragenter
public org.htmlunit.corejs.javascript.Function getOndragenter()
Returns theondragenterevent handler for this element.- Returns:
- the
ondragenterevent handler for this element
-
setOndragenter
public void setOndragenter(java.lang.Object ondragenter)
Sets theondragenterevent handler for this element.- Parameters:
ondragenter- theondragenterevent handler for this element
-
getOndragleave
public org.htmlunit.corejs.javascript.Function getOndragleave()
Returns theondragleaveevent handler for this element.- Returns:
- the
ondragleaveevent handler for this element
-
setOndragleave
public void setOndragleave(java.lang.Object ondragleave)
Sets theondragleaveevent handler for this element.- Parameters:
ondragleave- theondragleaveevent handler for this element
-
getOndragover
public org.htmlunit.corejs.javascript.Function getOndragover()
Returns theondragoverevent handler for this element.- Returns:
- the
ondragoverevent handler for this element
-
setOndragover
public void setOndragover(java.lang.Object ondragover)
Sets theondragoverevent handler for this element.- Parameters:
ondragover- theondragoverevent handler for this element
-
getOndragstart
public org.htmlunit.corejs.javascript.Function getOndragstart()
Returns theondragstartevent handler for this element.- Returns:
- the
ondragstartevent handler for this element
-
setOndragstart
public void setOndragstart(java.lang.Object ondragstart)
Sets theondragstartevent handler for this element.- Parameters:
ondragstart- theondragstartevent handler for this element
-
getOndrop
public org.htmlunit.corejs.javascript.Function getOndrop()
Returns theondropevent handler for this element.- Returns:
- the
ondropevent handler for this element
-
setOndrop
public void setOndrop(java.lang.Object ondrop)
Sets theondropevent handler for this element.- Parameters:
ondrop- theondropevent handler for this element
-
getOndurationchange
public org.htmlunit.corejs.javascript.Function getOndurationchange()
Returns theondurationchangeevent handler for this element.- Returns:
- the
ondurationchangeevent handler for this element
-
setOndurationchange
public void setOndurationchange(java.lang.Object ondurationchange)
Sets theondurationchangeevent handler for this element.- Parameters:
ondurationchange- theondurationchangeevent handler for this element
-
getOnemptied
public org.htmlunit.corejs.javascript.Function getOnemptied()
Returns theonemptiedevent handler for this element.- Returns:
- the
onemptiedevent handler for this element
-
setOnemptied
public void setOnemptied(java.lang.Object onemptied)
Sets theonemptiedevent handler for this element.- Parameters:
onemptied- theonemptiedevent handler for this element
-
getOnended
public org.htmlunit.corejs.javascript.Function getOnended()
Returns theonendedevent handler for this element.- Returns:
- the
onendedevent handler for this element
-
setOnended
public void setOnended(java.lang.Object onended)
Sets theonendedevent handler for this element.- Parameters:
onended- theonendedevent handler for this element
-
getOngotpointercapture
public org.htmlunit.corejs.javascript.Function getOngotpointercapture()
Returns theongotpointercaptureevent handler for this element.- Returns:
- the
ongotpointercaptureevent handler for this element
-
setOngotpointercapture
public void setOngotpointercapture(java.lang.Object ongotpointercapture)
Sets theongotpointercaptureevent handler for this element.- Parameters:
ongotpointercapture- theongotpointercaptureevent handler for this element
-
getOninvalid
public org.htmlunit.corejs.javascript.Function getOninvalid()
Returns theoninvalidevent handler for this element.- Returns:
- the
oninvalidevent handler for this element
-
setOninvalid
public void setOninvalid(java.lang.Object oninvalid)
Sets theoninvalidevent handler for this element.- Parameters:
oninvalid- theoninvalidevent handler for this element
-
getOnload
public org.htmlunit.corejs.javascript.Function getOnload()
Returns theonloadevent handler for this element.- Returns:
- the
onloadevent handler for this element
-
setOnload
public void setOnload(java.lang.Object onload)
Sets theonloadevent handler for this element.- Parameters:
onload- theonloadevent handler for this element
-
getOnloadeddata
public org.htmlunit.corejs.javascript.Function getOnloadeddata()
Returns theonloadeddataevent handler for this element.- Returns:
- the
onloadeddataevent handler for this element
-
setOnloadeddata
public void setOnloadeddata(java.lang.Object onloadeddata)
Sets theonloadeddataevent handler for this element.- Parameters:
onloadeddata- theonloadeddataevent handler for this element
-
getOnloadedmetadata
public org.htmlunit.corejs.javascript.Function getOnloadedmetadata()
Returns theonloadedmetadataevent handler for this element.- Returns:
- the
onloadedmetadataevent handler for this element
-
setOnloadedmetadata
public void setOnloadedmetadata(java.lang.Object onloadedmetadata)
Sets theonloadedmetadataevent handler for this element.- Parameters:
onloadedmetadata- theonloadedmetadataevent handler for this element
-
getOnloadstart
public org.htmlunit.corejs.javascript.Function getOnloadstart()
Returns theonloadstartevent handler for this element.- Returns:
- the
onloadstartevent handler for this element
-
setOnloadstart
public void setOnloadstart(java.lang.Object onloadstart)
Sets theonloadstartevent handler for this element.- Parameters:
onloadstart- theonloadstartevent handler for this element
-
getOnlostpointercapture
public org.htmlunit.corejs.javascript.Function getOnlostpointercapture()
Returns theonlostpointercaptureevent handler for this element.- Returns:
- the
onlostpointercaptureevent handler for this element
-
setOnlostpointercapture
public void setOnlostpointercapture(java.lang.Object onlostpointercapture)
Sets theonlostpointercaptureevent handler for this element.- Parameters:
onlostpointercapture- theonlostpointercaptureevent handler for this element
-
getOnmouseenter
public org.htmlunit.corejs.javascript.Function getOnmouseenter()
Returns theonmouseenterevent handler for this element.- Returns:
- the
onmouseenterevent handler for this element
-
setOnmouseenter
public void setOnmouseenter(java.lang.Object onmouseenter)
Sets theonmouseenterevent handler for this element.- Parameters:
onmouseenter- theonmouseenterevent handler for this element
-
getOnmouseleave
public org.htmlunit.corejs.javascript.Function getOnmouseleave()
Returns theonmouseleaveevent handler for this element.- Returns:
- the
onmouseleaveevent handler for this element
-
setOnmouseleave
public void setOnmouseleave(java.lang.Object onmouseleave)
Sets theonmouseleaveevent handler for this element.- Parameters:
onmouseleave- theonmouseleaveevent handler for this element
-
getOnmousewheel
public org.htmlunit.corejs.javascript.Function getOnmousewheel()
Returns theonmousewheelevent handler for this element.- Returns:
- the
onmousewheelevent handler for this element
-
setOnmousewheel
public void setOnmousewheel(java.lang.Object onmousewheel)
Sets theonmousewheelevent handler for this element.- Parameters:
onmousewheel- theonmousewheelevent handler for this element
-
getOnpaste
public org.htmlunit.corejs.javascript.Function getOnpaste()
Returns theonpasteevent handler for this element.- Returns:
- the
onpasteevent handler for this element
-
setOnpaste
public void setOnpaste(java.lang.Object onpaste)
Sets theonpasteevent handler for this element.- Parameters:
onpaste- theonpasteevent handler for this element
-
getOnpause
public org.htmlunit.corejs.javascript.Function getOnpause()
Returns theonpauseevent handler for this element.- Returns:
- the
onpauseevent handler for this element
-
setOnpause
public void setOnpause(java.lang.Object onpause)
Sets theonpauseevent handler for this element.- Parameters:
onpause- theonpauseevent handler for this element
-
getOnplay
public org.htmlunit.corejs.javascript.Function getOnplay()
Returns theonplayevent handler for this element.- Returns:
- the
onplayevent handler for this element
-
setOnplay
public void setOnplay(java.lang.Object onplay)
Sets theonplayevent handler for this element.- Parameters:
onplay- theonplayevent handler for this element
-
getOnplaying
public org.htmlunit.corejs.javascript.Function getOnplaying()
Returns theonplayingevent handler for this element.- Returns:
- the
onplayingevent handler for this element
-
setOnplaying
public void setOnplaying(java.lang.Object onplaying)
Sets theonplayingevent handler for this element.- Parameters:
onplaying- theonplayingevent handler for this element
-
getOnpointercancel
public org.htmlunit.corejs.javascript.Function getOnpointercancel()
Returns theonpointercancelevent handler for this element.- Returns:
- the
onpointercancelevent handler for this element
-
setOnpointercancel
public void setOnpointercancel(java.lang.Object onpointercancel)
Sets theonpointercancelevent handler for this element.- Parameters:
onpointercancel- theonpointercancelevent handler for this element
-
getOnpointerdown
public org.htmlunit.corejs.javascript.Function getOnpointerdown()
Returns theonpointerdownevent handler for this element.- Returns:
- the
onpointerdownevent handler for this element
-
setOnpointerdown
public void setOnpointerdown(java.lang.Object onpointerdown)
Sets theonpointerdownevent handler for this element.- Parameters:
onpointerdown- theonpointerdownevent handler for this element
-
getOnpointerenter
public org.htmlunit.corejs.javascript.Function getOnpointerenter()
Returns theonpointerenterevent handler for this element.- Returns:
- the
onpointerenterevent handler for this element
-
setOnpointerenter
public void setOnpointerenter(java.lang.Object onpointerenter)
Sets theonpointerenterevent handler for this element.- Parameters:
onpointerenter- theonpointerenterevent handler for this element
-
getOnpointerleave
public org.htmlunit.corejs.javascript.Function getOnpointerleave()
Returns theonpointerleaveevent handler for this element.- Returns:
- the
onpointerleaveevent handler for this element
-
setOnpointerleave
public void setOnpointerleave(java.lang.Object onpointerleave)
Sets theonpointerleaveevent handler for this element.- Parameters:
onpointerleave- theonpointerleaveevent handler for this element
-
getOnpointerlockchange
public org.htmlunit.corejs.javascript.Function getOnpointerlockchange()
Returns theonpointerlockchangeevent handler for this element.- Returns:
- the
onpointerlockchangeevent handler for this element
-
setOnpointerlockchange
public void setOnpointerlockchange(java.lang.Object onpointerlockchange)
Sets theonpointerlockchangeevent handler for this element.- Parameters:
onpointerlockchange- theonpointerlockchangeevent handler for this element
-
getOnpointerlockerror
public org.htmlunit.corejs.javascript.Function getOnpointerlockerror()
Returns theonpointerlockerrorevent handler for this element.- Returns:
- the
onpointerlockerrorevent handler for this element
-
setOnpointerlockerror
public void setOnpointerlockerror(java.lang.Object onpointerlockerror)
Sets theonpointerlockerrorevent handler for this element.- Parameters:
onpointerlockerror- theonpointerlockerrorevent handler for this element
-
getOnpointermove
public org.htmlunit.corejs.javascript.Function getOnpointermove()
Returns theonpointermoveevent handler for this element.- Returns:
- the
onpointermoveevent handler for this element
-
setOnpointermove
public void setOnpointermove(java.lang.Object onpointermove)
Sets theonpointermoveevent handler for this element.- Parameters:
onpointermove- theonpointermoveevent handler for this element
-
getOnpointerout
public org.htmlunit.corejs.javascript.Function getOnpointerout()
Returns theonpointeroutevent handler for this element.- Returns:
- the
onpointeroutevent handler for this element
-
setOnpointerout
public void setOnpointerout(java.lang.Object onpointerout)
Sets theonpointeroutevent handler for this element.- Parameters:
onpointerout- theonpointeroutevent handler for this element
-
getOnpointerover
public org.htmlunit.corejs.javascript.Function getOnpointerover()
Returns theonpointeroverevent handler for this element.- Returns:
- the
onpointeroverevent handler for this element
-
setOnpointerover
public void setOnpointerover(java.lang.Object onpointerover)
Sets theonpointeroverevent handler for this element.- Parameters:
onpointerover- theonpointeroverevent handler for this element
-
getOnpointerup
public org.htmlunit.corejs.javascript.Function getOnpointerup()
Returns theonpointerupevent handler for this element.- Returns:
- the
onpointerupevent handler for this element
-
setOnpointerup
public void setOnpointerup(java.lang.Object onpointerup)
Sets theonpointerupevent handler for this element.- Parameters:
onpointerup- theonpointerupevent handler for this element
-
getOnprogress
public org.htmlunit.corejs.javascript.Function getOnprogress()
Returns theonprogressevent handler for this element.- Returns:
- the
onprogressevent handler for this element
-
setOnprogress
public void setOnprogress(java.lang.Object onprogress)
Sets theonprogressevent handler for this element.- Parameters:
onprogress- theonprogressevent handler for this element
-
getOnratechange
public org.htmlunit.corejs.javascript.Function getOnratechange()
Returns theonratechangeevent handler for this element.- Returns:
- the
onratechangeevent handler for this element
-
setOnratechange
public void setOnratechange(java.lang.Object onratechange)
Sets theonratechangeevent handler for this element.- Parameters:
onratechange- theonratechangeevent handler for this element
-
getOnreadystatechange
public org.htmlunit.corejs.javascript.Function getOnreadystatechange()
Returns theonreadystatechangeevent handler for this element.- Returns:
- the
onreadystatechangeevent handler for this element
-
setOnreadystatechange
public void setOnreadystatechange(java.lang.Object onreadystatechange)
Sets theonreadystatechangeevent handler for this element.- Parameters:
onreadystatechange- theonreadystatechangeevent handler for this element
-
getOnreset
public org.htmlunit.corejs.javascript.Function getOnreset()
Returns theonresetevent handler for this element.- Returns:
- the
onresetevent handler for this element
-
setOnreset
public void setOnreset(java.lang.Object onreset)
Sets theonresetevent handler for this element.- Parameters:
onreset- theonresetevent handler for this element
-
getOnscroll
public org.htmlunit.corejs.javascript.Function getOnscroll()
Returns theonscrollevent handler for this element.- Returns:
- the
onscrollevent handler for this element
-
setOnscroll
public void setOnscroll(java.lang.Object onscroll)
Sets theonscrollevent handler for this element.- Parameters:
onscroll- theonscrollevent handler for this element
-
getOnsearch
public org.htmlunit.corejs.javascript.Function getOnsearch()
Returns theonsearchevent handler for this element.- Returns:
- the
onsearchevent handler for this element
-
setOnsearch
public void setOnsearch(java.lang.Object onsearch)
Sets theonsearchevent handler for this element.- Parameters:
onsearch- theonsearchevent handler for this element
-
getOnseeked
public org.htmlunit.corejs.javascript.Function getOnseeked()
Returns theonseekedevent handler for this element.- Returns:
- the
onseekedevent handler for this element
-
setOnseeked
public void setOnseeked(java.lang.Object onseeked)
Sets theonseekedevent handler for this element.- Parameters:
onseeked- theonseekedevent handler for this element
-
getOnseeking
public org.htmlunit.corejs.javascript.Function getOnseeking()
Returns theonseekingevent handler for this element.- Returns:
- the
onseekingevent handler for this element
-
setOnseeking
public void setOnseeking(java.lang.Object onseeking)
Sets theonseekingevent handler for this element.- Parameters:
onseeking- theonseekingevent handler for this element
-
getOnselect
public org.htmlunit.corejs.javascript.Function getOnselect()
Returns theonselectevent handler for this element.- Returns:
- the
onselectevent handler for this element
-
setOnselect
public void setOnselect(java.lang.Object onselect)
Sets theonselectevent handler for this element.- Parameters:
onselect- theonselectevent handler for this element
-
getOnselectionchange
public org.htmlunit.corejs.javascript.Function getOnselectionchange()
Returns theonselectionchangeevent handler for this element.- Returns:
- the
onselectionchangeevent handler for this element
-
setOnselectionchange
public void setOnselectionchange(java.lang.Object onselectionchange)
Sets theonselectionchangeevent handler for this element.- Parameters:
onselectionchange- theonselectionchangeevent handler for this element
-
getOnselectstart
public org.htmlunit.corejs.javascript.Function getOnselectstart()
Returns theonselectstartevent handler for this element.- Returns:
- the
onselectstartevent handler for this element
-
setOnselectstart
public void setOnselectstart(java.lang.Object onselectstart)
Sets theonselectstartevent handler for this element.- Parameters:
onselectstart- theonselectstartevent handler for this element
-
getOnstalled
public org.htmlunit.corejs.javascript.Function getOnstalled()
Returns theonstalledevent handler for this element.- Returns:
- the
onstalledevent handler for this element
-
setOnstalled
public void setOnstalled(java.lang.Object onstalled)
Sets theonstalledevent handler for this element.- Parameters:
onstalled- theonstalledevent handler for this element
-
getOnsubmit
public org.htmlunit.corejs.javascript.Function getOnsubmit()
Returns theonsubmitevent handler for this element.- Returns:
- the
onsubmitevent handler for this element
-
setOnsubmit
public void setOnsubmit(java.lang.Object onsubmit)
Sets theonsubmitevent handler for this element.- Parameters:
onsubmit- theonsubmitevent handler for this element
-
getOnsuspend
public org.htmlunit.corejs.javascript.Function getOnsuspend()
Returns theonsuspendevent handler for this element.- Returns:
- the
onsuspendevent handler for this element
-
setOnsuspend
public void setOnsuspend(java.lang.Object onsuspend)
Sets theonsuspendevent handler for this element.- Parameters:
onsuspend- theonsuspendevent handler for this element
-
getOntimeupdate
public org.htmlunit.corejs.javascript.Function getOntimeupdate()
Returns theontimeupdateevent handler for this element.- Returns:
- the
ontimeupdateevent handler for this element
-
setOntimeupdate
public void setOntimeupdate(java.lang.Object ontimeupdate)
Sets theontimeupdateevent handler for this element.- Parameters:
ontimeupdate- theontimeupdateevent handler for this element
-
getOntoggle
public org.htmlunit.corejs.javascript.Function getOntoggle()
Returns theontoggleevent handler for this element.- Returns:
- the
ontoggleevent handler for this element
-
setOntoggle
public void setOntoggle(java.lang.Object ontoggle)
Sets theontoggleevent handler for this element.- Parameters:
ontoggle- theontoggleevent handler for this element
-
getOnvolumechange
public org.htmlunit.corejs.javascript.Function getOnvolumechange()
Returns theonvolumechangeevent handler for this element.- Returns:
- the
onvolumechangeevent handler for this element
-
setOnvolumechange
public void setOnvolumechange(java.lang.Object onvolumechange)
Sets theonvolumechangeevent handler for this element.- Parameters:
onvolumechange- theonvolumechangeevent handler for this element
-
getOnwaiting
public org.htmlunit.corejs.javascript.Function getOnwaiting()
Returns theonwaitingevent handler for this element.- Returns:
- the
onwaitingevent handler for this element
-
setOnwaiting
public void setOnwaiting(java.lang.Object onwaiting)
Sets theonwaitingevent handler for this element.- Parameters:
onwaiting- theonwaitingevent handler for this element
-
getOnwebkitfullscreenchange
public org.htmlunit.corejs.javascript.Function getOnwebkitfullscreenchange()
Returns theonwebkitfullscreenchangeevent handler for this element.- Returns:
- the
onwebkitfullscreenchangeevent handler for this element
-
setOnwebkitfullscreenchange
public void setOnwebkitfullscreenchange(java.lang.Object onwebkitfullscreenchange)
Sets theonwebkitfullscreenchangeevent handler for this element.- Parameters:
onwebkitfullscreenchange- theonwebkitfullscreenchangeevent handler for this element
-
getOnwebkitfullscreenerror
public org.htmlunit.corejs.javascript.Function getOnwebkitfullscreenerror()
Returns theonwebkitfullscreenerrorevent handler for this element.- Returns:
- the
onwebkitfullscreenerrorevent handler for this element
-
setOnwebkitfullscreenerror
public void setOnwebkitfullscreenerror(java.lang.Object onwebkitfullscreenerror)
Sets theonwebkitfullscreenerrorevent handler for this element.- Parameters:
onwebkitfullscreenerror- theonwebkitfullscreenerrorevent handler for this element
-
getOnwheel
public org.htmlunit.corejs.javascript.Function getOnwheel()
Returns theonwheelevent handler for this element.- Returns:
- the
onwheelevent handler for this element
-
setOnwheel
public void setOnwheel(java.lang.Object onwheel)
Sets theonwheelevent handler for this element.- Parameters:
onwheel- theonwheelevent handler for this element
-
getOnafterscriptexecute
public org.htmlunit.corejs.javascript.Function getOnafterscriptexecute()
Returns theonafterscriptexecuteevent handler for this element.- Returns:
- the
onafterscriptexecuteevent handler for this element
-
setOnafterscriptexecute
public void setOnafterscriptexecute(java.lang.Object onafterscriptexecute)
Sets theonafterscriptexecuteevent handler for this element.- Parameters:
onafterscriptexecute- theonafterscriptexecuteevent handler for this element
-
getOnbeforescriptexecute
public org.htmlunit.corejs.javascript.Function getOnbeforescriptexecute()
Returns theonbeforescriptexecuteevent handler for this element.- Returns:
- the
onbeforescriptexecuteevent handler for this element
-
setOnbeforescriptexecute
public void setOnbeforescriptexecute(java.lang.Object onbeforescriptexecute)
Sets theonbeforescriptexecuteevent handler for this element.- Parameters:
onbeforescriptexecute- theonbeforescriptexecuteevent handler for this element
-
getOnmozfullscreenchange
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenchange()
Returns theonmozfullscreenchangeevent handler for this element.- Returns:
- the
onmozfullscreenchangeevent handler for this element
-
setOnmozfullscreenchange
public void setOnmozfullscreenchange(java.lang.Object onmozfullscreenchange)
Sets theonmozfullscreenchangeevent handler for this element.- Parameters:
onmozfullscreenchange- theonmozfullscreenchangeevent handler for this element
-
getOnmozfullscreenerror
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenerror()
Returns theonmozfullscreenerrorevent handler for this element.- Returns:
- the
onmozfullscreenerrorevent handler for this element
-
setOnmozfullscreenerror
public void setOnmozfullscreenerror(java.lang.Object onmozfullscreenerror)
Sets theonmozfullscreenerrorevent handler for this element.- Parameters:
onmozfullscreenerror- theonmozfullscreenerrorevent handler for this element
-
getCurrentScript
public org.htmlunit.corejs.javascript.ScriptableObject getCurrentScript()
- Returns:
- the
currentScript
-
setCurrentScript
public void setCurrentScript(org.htmlunit.corejs.javascript.ScriptableObject script)
- Parameters:
script- thecurrentScript
-
getFonts
public org.htmlunit.corejs.javascript.ScriptableObject getFonts()
- Returns:
- the
FontFaceSet
-
getAll
public HTMLCollection getAll()
Returns the value of theallproperty.- Returns:
- the value of the
allproperty
-
getElementById
public HtmlUnitScriptable getElementById(java.lang.String id)
Returns the element with the specified ID, as long as it is an HTML element;nullotherwise.- Parameters:
id- the ID to search for- Returns:
- the element with the specified ID, as long as it is an HTML element;
nullotherwise
-
createProcessingInstruction
public java.lang.Object createProcessingInstruction(java.lang.String target, java.lang.String data)Creates a new ProcessingInstruction.- Parameters:
target- the targetdata- 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.
-
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
nullif not found.
-
revokeBlobUrl
public void revokeBlobUrl(java.lang.String url)
Revokes the URL for the given blob.- Parameters:
url- the url to revokeURL.revokeObjectURL(Scriptable)
-
-