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.String
compatMode_
private org.htmlunit.corejs.javascript.ScriptableObject
currentScript_
private java.lang.String
designMode_
private int
documentMode_
private java.lang.String
domain_
private static java.util.Set<java.lang.String>
EXECUTE_CMDS_CHROME
private static java.util.Set<java.lang.String>
EXECUTE_CMDS_FF
https://developer.mozilla.org/en/Rich-Text_Editing_in_Mozilla#Executing_Commandsprivate FontFaceSet
fonts_
private DOMImplementation
implementation_
private static java.lang.String
LAST_MODIFIED_DATE_FORMAT
The format to use for thelastModified
attribute.private java.lang.String
lastModified_
private static org.apache.commons.logging.Log
LOG
private StyleSheetList
styleSheetList_
private static java.util.Map<java.lang.String,java.lang.Class<? extends Event>>
SUPPORTED_DOM2_EVENT_TYPE_MAP
Contains all supported DOM level 2 events.private static java.util.Map<java.lang.String,java.lang.Class<? extends Event>>
SUPPORTED_DOM3_EVENT_TYPE_MAP
Contains all supported DOM level 3 events.private static java.util.Map<java.lang.String,java.lang.Class<? extends Event>>
SUPPORTED_VENDOR_EVENT_TYPE_MAP
Contains all supported vendor specific events.private static java.util.regex.Pattern
TAG_NAME_PATTERN
private Window
window_
-
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.Object
adoptNode(Node externalNode)
Adopts a node from an external document.void
captureEvents(java.lang.String type)
Does nothing special anymore.void
clear()
Does...void
close()
JavaScript functionclose
.boolean
contains(java.lang.Object element)
Checks whether the given element is contained within this object.Attr
createAttribute(java.lang.String attributeName)
Creates a new HTML attribute with the specified name.java.lang.Object
createCDATASection(java.lang.String data)
Creates a new createCDATASection.java.lang.Object
createComment(java.lang.String comment)
Creates a new Comment.java.lang.Object
createDocumentFragment()
Creates a new document fragment.java.lang.Object
createElement(java.lang.String tagName)
Creates a new element with the given tag name.java.lang.Object
createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName)
Creates a new HTML element with the given tag name, and name.Event
createEvent(java.lang.String eventType)
Implementation of theDocumentEvent
interface'sDocumentEvent.createEvent(String)
method.private static org.w3c.dom.traversal.NodeFilter
createFilterWrapper(org.htmlunit.corejs.javascript.Scriptable filter, boolean filterFunctionOnly)
NodeIterator
createNodeIterator(Node root, int whatToShow, org.htmlunit.corejs.javascript.Scriptable filter)
Returns a new NodeIterator object.XPathNSResolver
createNSResolver(Node nodeResolver)
Adapts any DOM node to resolve namespaces so that an XPath expression can be easily evaluated relative to the context of the node where it appeared within the document.java.lang.Object
createProcessingInstruction(java.lang.String target, java.lang.String data)
Creates a new ProcessingInstruction.Range
createRange()
Creates and returns a new range.java.lang.Object
createTextNode(java.lang.String newData)
Create a new DOM text node with the given data.java.lang.Object
createTreeWalker(Node root, double whatToShow, org.htmlunit.corejs.javascript.Scriptable filter, boolean expandEntityReferences)
Creates and returns a new TreeWalker.java.lang.Object
elementFromPoint(int x, int y)
Returns the element for the specified x coordinate and the specified y coordinate.XPathResult
evaluate(java.lang.String expression, Node contextNode, java.lang.Object resolver, int type, java.lang.Object result)
Evaluates an XPath expression string and returns a result of the specified type if possible.boolean
execCommand(java.lang.String cmd, boolean userInterface, java.lang.Object value)
Executes a command.void
forceDocumentMode(int documentMode)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Called from the HTMLParser if a 'X-UA-Compatible' meta tag found.java.lang.String
generateBlobUrl(Blob blob)
Generate and return the URL for the given blob.java.lang.Object
getActiveElement()
Returns the value of theactiveElement
property.java.lang.String
getAlinkColor()
Returns the value of thealinkColor
property.HTMLCollection
getAll()
Returns the value of theall
property.java.lang.Object
getAnchors()
Returns the value of the JavaScript propertyanchors
.java.lang.Object
getApplets()
Returns the value of the JavaScript propertyapplets
.java.lang.String
getBgColor()
Returns the value of thebgColor
property.HTMLElement
getBody()
Returns this document'sbody
element.java.lang.String
getCharacterSet()
Returns the character encoding of the current document.java.lang.String
getCharset()
Retrieves the character set used to encode the document.int
getChildElementCount()
Returns the current number of child elements.HTMLCollection
getChildren()
Gets the children of the current node.java.lang.String
getCompatMode()
Returns thecompatMode
property.java.lang.String
getContentType()
Returns thecontentType
property.java.lang.String
getCookie()
Returns thecookie
property.org.htmlunit.corejs.javascript.ScriptableObject
getCurrentScript()
java.lang.Object
getDefaultView()
Gets the window in which this document is contained.java.lang.String
getDesignMode()
Returns a value which indicates whether or not the document can be edited.HtmlUnitScriptable
getDoctype()
Gets the JavaScript propertydoctype
for the document.Element
getDocumentElement()
Gets the JavaScript propertydocumentElement
for the document.int
getDocumentMode()
Returns thedocumentMode
property.java.lang.String
getDocumentURI()
Returns the value of thedocumentURI
property.java.lang.String
getDomain()
Returns the domain name of the server that served the document, ornull
if the server cannot be identified by a domain name.HtmlUnitScriptable
getElementById(java.lang.String id)
Returns the element with the specified ID, as long as it is an HTML element;null
otherwise.HTMLCollection
getElementsByClassName(java.lang.String className)
Returns all the descendant elements with the specified class name.NodeList
getElementsByName(java.lang.String elementName)
Returns all HTML elements that have aname
attribute with the specified value.HTMLCollection
getElementsByTagName(java.lang.String tagName)
Returns all the descendant elements with the specified tag name.java.lang.Object
getElementsByTagNameNS(java.lang.Object namespaceURI, java.lang.String localName)
Returns a list of elements with the given tag name belonging to the given namespace.java.lang.Object
getEmbeds()
Returns the value of theembeds
property.java.lang.String
getFgColor()
Returns the value of thefgColor
property.Element
getFirstElementChild()
Returns the first element child.org.htmlunit.corejs.javascript.ScriptableObject
getFonts()
java.lang.Object
getForms()
Returns the value of theforms
property.java.lang.Object
getHead()
Returns this document'shead
element.boolean
getHidden()
Returns thehidden
property.java.lang.Object
getImages()
Returns the value of theembeds
property.DOMImplementation
getImplementation()
Returns the implementation object of the current document.java.lang.String
getInputEncoding()
Returns a string representing the encoding under which the document was parsed.Element
getLastElementChild()
Returns the last element child.java.lang.String
getLastModified()
Returns the last modification date of the document.java.lang.String
getLinkColor()
Returns the value of thelinkColor
property.java.lang.Object
getLinks()
Returns the value of the JavaScript propertylinks
.Location
getLocation()
Returns the value of thelocation
property.org.htmlunit.corejs.javascript.Function
getOnabort()
Returns theonabort
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnafterscriptexecute()
Returns theonafterscriptexecute
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnauxclick()
Returns theonauxclick
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnbeforecopy()
Returns theonbeforecopy
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnbeforecut()
Returns theonbeforecut
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnbeforepaste()
Returns theonbeforepaste
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnbeforescriptexecute()
Returns theonbeforescriptexecute
event handler for this element.java.lang.Object
getOnblur()
Returns theonblur
event handler for this element.org.htmlunit.corejs.javascript.Function
getOncancel()
Returns theoncancel
event handler for this element.org.htmlunit.corejs.javascript.Function
getOncanplay()
Returns theoncanplay
event handler for this element.org.htmlunit.corejs.javascript.Function
getOncanplaythrough()
Returns theoncanplaythrough
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnchange()
Returns theonchange
event handler for this element.java.lang.Object
getOnclick()
Returns theonclick
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnclose()
Returns theonclose
event handler for this element.java.lang.Object
getOncontextmenu()
Returns theoncontextmenu
event handler for this element.org.htmlunit.corejs.javascript.Function
getOncopy()
Returns theoncopy
event handler for this element.org.htmlunit.corejs.javascript.Function
getOncuechange()
Returns theoncuechange
event handler for this element.org.htmlunit.corejs.javascript.Function
getOncut()
Returns theoncut
event handler for this element.java.lang.Object
getOndblclick()
Returns theondblclick
event handler for this element.org.htmlunit.corejs.javascript.Function
getOndrag()
Returns theondrag
event handler for this element.org.htmlunit.corejs.javascript.Function
getOndragend()
Returns theondragend
event handler for this element.org.htmlunit.corejs.javascript.Function
getOndragenter()
Returns theondragenter
event handler for this element.org.htmlunit.corejs.javascript.Function
getOndragleave()
Returns theondragleave
event handler for this element.org.htmlunit.corejs.javascript.Function
getOndragover()
Returns theondragover
event handler for this element.org.htmlunit.corejs.javascript.Function
getOndragstart()
Returns theondragstart
event handler for this element.org.htmlunit.corejs.javascript.Function
getOndrop()
Returns theondrop
event handler for this element.org.htmlunit.corejs.javascript.Function
getOndurationchange()
Returns theondurationchange
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnemptied()
Returns theonemptied
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnended()
Returns theonended
event handler for this element.java.lang.Object
getOnerror()
Returns theonerror
event handler for this element.java.lang.Object
getOnfocus()
Returns theonfocus
event handler for this element.org.htmlunit.corejs.javascript.Function
getOngotpointercapture()
Returns theongotpointercapture
event handler for this element.org.htmlunit.corejs.javascript.Function
getOninput()
Returns theoninput
event handler for this element.org.htmlunit.corejs.javascript.Function
getOninvalid()
Returns theoninvalid
event handler for this element.java.lang.Object
getOnkeydown()
Returns theonkeydown
event handler for this element.java.lang.Object
getOnkeypress()
Returns theonkeypress
event handler for this element.java.lang.Object
getOnkeyup()
Returns theonkeyup
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnload()
Returns theonload
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnloadeddata()
Returns theonloadeddata
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnloadedmetadata()
Returns theonloadedmetadata
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnloadstart()
Returns theonloadstart
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnlostpointercapture()
Returns theonlostpointercapture
event handler for this element.java.lang.Object
getOnmousedown()
Returns theonmousedown
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnmouseenter()
Returns theonmouseenter
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnmouseleave()
Returns theonmouseleave
event handler for this element.java.lang.Object
getOnmousemove()
Returns theonmousemove
event handler for this element.java.lang.Object
getOnmouseout()
Returns theonmouseout
event handler for this element.java.lang.Object
getOnmouseover()
Returns theonmouseover
event handler for this element.java.lang.Object
getOnmouseup()
Returns theonmouseup
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnmousewheel()
Returns theonmousewheel
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnmozfullscreenchange()
Returns theonmozfullscreenchange
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnmozfullscreenerror()
Returns theonmozfullscreenerror
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpaste()
Returns theonpaste
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpause()
Returns theonpause
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnplay()
Returns theonplay
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnplaying()
Returns theonplaying
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpointercancel()
Returns theonpointercancel
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpointerdown()
Returns theonpointerdown
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpointerenter()
Returns theonpointerenter
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpointerleave()
Returns theonpointerleave
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpointerlockchange()
Returns theonpointerlockchange
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpointerlockerror()
Returns theonpointerlockerror
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpointermove()
Returns theonpointermove
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpointerout()
Returns theonpointerout
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpointerover()
Returns theonpointerover
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnpointerup()
Returns theonpointerup
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnprogress()
Returns theonprogress
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnratechange()
Returns theonratechange
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnreadystatechange()
Returns theonreadystatechange
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnreset()
Returns theonreset
event handler for this element.java.lang.Object
getOnresize()
Returns theonresize
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnscroll()
Returns theonscroll
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnsearch()
Returns theonsearch
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnseeked()
Returns theonseeked
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnseeking()
Returns theonseeking
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnselect()
Returns theonselect
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnselectionchange()
Returns theonselectionchange
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnselectstart()
Returns theonselectstart
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnstalled()
Returns theonstalled
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnsubmit()
Returns theonsubmit
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnsuspend()
Returns theonsuspend
event handler for this element.org.htmlunit.corejs.javascript.Function
getOntimeupdate()
Returns theontimeupdate
event handler for this element.org.htmlunit.corejs.javascript.Function
getOntoggle()
Returns theontoggle
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnvolumechange()
Returns theonvolumechange
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnwaiting()
Returns theonwaiting
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnwebkitfullscreenchange()
Returns theonwebkitfullscreenchange
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnwebkitfullscreenerror()
Returns theonwebkitfullscreenerror
event handler for this element.org.htmlunit.corejs.javascript.Function
getOnwheel()
Returns theonwheel
event handler for this element.SgmlPage
getPage()
Returns the page that this document is modeling.java.lang.Object
getPlugins()
Returns the value of theplugins
property.java.lang.String
getReadyState()
Returns the ready state of the document.java.lang.String
getReferrer()
Returns the value of thereferrer
property.Element
getRootElement()
Gets the JavaScript propertyrootElement
.java.lang.Object
getScripts()
Returns the value of thescripts
property.Selection
getSelection()
Returns the current selection.StyleSheetList
getStyleSheets()
Retrieves a collection of stylesheet objects representing the style sheets that correspond to each instance of a Link orCSSStyleDeclaration
object in the document.java.lang.String
getTitle()
Returns this document's title.java.lang.String
getURL_js()
Returns the value of theURL
property.java.lang.String
getVlinkColor()
Returns the value of thevlinkColor
property.java.lang.String
getXmlEncoding()
Returns thexmlEncoding
property.java.lang.String
getXmlVersion()
Returns thexmlVersion
property.private boolean
hasCommand(java.lang.String cmd, boolean includeBold)
boolean
hasFocus()
Returnsfalse
if the active element in the document has no focus;true
if the active element in the document has focus.HtmlUnitScriptable
importNode(Node importedNode, boolean deep)
Imports a node from another document to this document.private boolean
isQuirksDocType()
boolean
isXmlStandalone()
Returns thexmlStandalone
property.void
jsConstructor()
JavaScript constructor.private static java.util.Date
parseDateOrNow(java.lang.String stringDate)
boolean
queryCommandEnabled(java.lang.String cmd)
Indicates if the command can be successfully executed usingexecCommand
, given the current state of the document.boolean
queryCommandSupported(java.lang.String cmd)
Indicates if the command is supported.Node
querySelector(java.lang.String selectors)
Returns the first element within the document that matches the specified group of selectors.NodeList
querySelectorAll(java.lang.String selectors)
Retrieves all element nodes from descendants of the starting element node that match any selector within the supplied selector strings.void
releaseCapture()
Mock for the moment.void
releaseEvents(java.lang.String type)
Does nothing special anymore.Blob
resolveBlobUrl(java.lang.String url)
void
revokeBlobUrl(java.lang.String url)
Revokes the URL for the given blob.void
setAlinkColor(java.lang.String color)
Sets the value of thealinkColor
property.void
setBgColor(java.lang.String color)
Sets the value of thebgColor
property.void
setBody(HTMLElement htmlElement)
Sets thebody
element of the document.void
setCurrentScript(org.htmlunit.corejs.javascript.ScriptableObject script)
void
setDesignMode(java.lang.String mode)
Sets a value which indicates whether or not the document can be edited.void
setDomain(java.lang.String newDomain)
Sets the domain of this document.void
setFgColor(java.lang.String color)
Sets the value of thefgColor
property.void
setLinkColor(java.lang.String color)
Sets the value of thelinkColor
property.void
setLocation(java.lang.String location)
Sets the value of thelocation
property.void
setOnabort(java.lang.Object onabort)
Sets theonabort
event handler for this element.void
setOnafterscriptexecute(java.lang.Object onafterscriptexecute)
Sets theonafterscriptexecute
event handler for this element.void
setOnauxclick(java.lang.Object onauxclick)
Sets theonauxclick
event handler for this element.void
setOnbeforecopy(java.lang.Object onbeforecopy)
Sets theonbeforecopy
event handler for this element.void
setOnbeforecut(java.lang.Object onbeforecut)
Sets theonbeforecut
event handler for this element.void
setOnbeforepaste(java.lang.Object onbeforepaste)
Sets theonbeforepaste
event handler for this element.void
setOnbeforescriptexecute(java.lang.Object onbeforescriptexecute)
Sets theonbeforescriptexecute
event handler for this element.void
setOnblur(java.lang.Object handler)
Sets theonblur
event handler for this element.void
setOncancel(java.lang.Object oncancel)
Sets theoncancel
event handler for this element.void
setOncanplay(java.lang.Object oncanplay)
Sets theoncanplay
event handler for this element.void
setOncanplaythrough(java.lang.Object oncanplaythrough)
Sets theoncanplaythrough
event handler for this element.void
setOnchange(java.lang.Object onchange)
Sets theonchange
event handler for this element.void
setOnclick(java.lang.Object handler)
Sets theonclick
event handler for this element.void
setOnclose(java.lang.Object onclose)
Sets theonclose
event handler for this element.void
setOncontextmenu(java.lang.Object handler)
Sets theoncontextmenu
event handler for this element.void
setOncopy(java.lang.Object oncopy)
Sets theoncopy
event handler for this element.void
setOncuechange(java.lang.Object oncuechange)
Sets theoncuechange
event handler for this element.void
setOncut(java.lang.Object oncut)
Sets theoncut
event handler for this element.void
setOndblclick(java.lang.Object handler)
Sets theondblclick
event handler for this element.void
setOndrag(java.lang.Object ondrag)
Sets theondrag
event handler for this element.void
setOndragend(java.lang.Object ondragend)
Sets theondragend
event handler for this element.void
setOndragenter(java.lang.Object ondragenter)
Sets theondragenter
event handler for this element.void
setOndragleave(java.lang.Object ondragleave)
Sets theondragleave
event handler for this element.void
setOndragover(java.lang.Object ondragover)
Sets theondragover
event handler for this element.void
setOndragstart(java.lang.Object ondragstart)
Sets theondragstart
event handler for this element.void
setOndrop(java.lang.Object ondrop)
Sets theondrop
event handler for this element.void
setOndurationchange(java.lang.Object ondurationchange)
Sets theondurationchange
event handler for this element.void
setOnemptied(java.lang.Object onemptied)
Sets theonemptied
event handler for this element.void
setOnended(java.lang.Object onended)
Sets theonended
event handler for this element.void
setOnerror(java.lang.Object handler)
Sets theonerror
event handler for this element.void
setOnfocus(java.lang.Object handler)
Sets theonfocus
event handler for this element.void
setOngotpointercapture(java.lang.Object ongotpointercapture)
Sets theongotpointercapture
event handler for this element.void
setOninput(java.lang.Object oninput)
Sets theoninput
event handler for this element.void
setOninvalid(java.lang.Object oninvalid)
Sets theoninvalid
event handler for this element.void
setOnkeydown(java.lang.Object handler)
Sets theonkeydown
event handler for this element.void
setOnkeypress(java.lang.Object handler)
Sets theonkeypress
event handler for this element.void
setOnkeyup(java.lang.Object handler)
Sets theonkeyup
event handler for this element.void
setOnload(java.lang.Object onload)
Sets theonload
event handler for this element.void
setOnloadeddata(java.lang.Object onloadeddata)
Sets theonloadeddata
event handler for this element.void
setOnloadedmetadata(java.lang.Object onloadedmetadata)
Sets theonloadedmetadata
event handler for this element.void
setOnloadstart(java.lang.Object onloadstart)
Sets theonloadstart
event handler for this element.void
setOnlostpointercapture(java.lang.Object onlostpointercapture)
Sets theonlostpointercapture
event handler for this element.void
setOnmousedown(java.lang.Object handler)
Sets theonmousedown
event handler for this element.void
setOnmouseenter(java.lang.Object onmouseenter)
Sets theonmouseenter
event handler for this element.void
setOnmouseleave(java.lang.Object onmouseleave)
Sets theonmouseleave
event handler for this element.void
setOnmousemove(java.lang.Object handler)
Sets theonmousemove
event handler for this element.void
setOnmouseout(java.lang.Object handler)
Sets theonmouseout
event handler for this element.void
setOnmouseover(java.lang.Object handler)
Sets theonmouseover
event handler for this element.void
setOnmouseup(java.lang.Object handler)
Sets theonmouseup
event handler for this element.void
setOnmousewheel(java.lang.Object onmousewheel)
Sets theonmousewheel
event handler for this element.void
setOnmozfullscreenchange(java.lang.Object onmozfullscreenchange)
Sets theonmozfullscreenchange
event handler for this element.void
setOnmozfullscreenerror(java.lang.Object onmozfullscreenerror)
Sets theonmozfullscreenerror
event handler for this element.void
setOnpaste(java.lang.Object onpaste)
Sets theonpaste
event handler for this element.void
setOnpause(java.lang.Object onpause)
Sets theonpause
event handler for this element.void
setOnplay(java.lang.Object onplay)
Sets theonplay
event handler for this element.void
setOnplaying(java.lang.Object onplaying)
Sets theonplaying
event handler for this element.void
setOnpointercancel(java.lang.Object onpointercancel)
Sets theonpointercancel
event handler for this element.void
setOnpointerdown(java.lang.Object onpointerdown)
Sets theonpointerdown
event handler for this element.void
setOnpointerenter(java.lang.Object onpointerenter)
Sets theonpointerenter
event handler for this element.void
setOnpointerleave(java.lang.Object onpointerleave)
Sets theonpointerleave
event handler for this element.void
setOnpointerlockchange(java.lang.Object onpointerlockchange)
Sets theonpointerlockchange
event handler for this element.void
setOnpointerlockerror(java.lang.Object onpointerlockerror)
Sets theonpointerlockerror
event handler for this element.void
setOnpointermove(java.lang.Object onpointermove)
Sets theonpointermove
event handler for this element.void
setOnpointerout(java.lang.Object onpointerout)
Sets theonpointerout
event handler for this element.void
setOnpointerover(java.lang.Object onpointerover)
Sets theonpointerover
event handler for this element.void
setOnpointerup(java.lang.Object onpointerup)
Sets theonpointerup
event handler for this element.void
setOnprogress(java.lang.Object onprogress)
Sets theonprogress
event handler for this element.void
setOnratechange(java.lang.Object onratechange)
Sets theonratechange
event handler for this element.void
setOnreadystatechange(java.lang.Object onreadystatechange)
Sets theonreadystatechange
event handler for this element.void
setOnreset(java.lang.Object onreset)
Sets theonreset
event handler for this element.void
setOnresize(java.lang.Object handler)
Sets theonresize
event handler for this element.void
setOnscroll(java.lang.Object onscroll)
Sets theonscroll
event handler for this element.void
setOnsearch(java.lang.Object onsearch)
Sets theonsearch
event handler for this element.void
setOnseeked(java.lang.Object onseeked)
Sets theonseeked
event handler for this element.void
setOnseeking(java.lang.Object onseeking)
Sets theonseeking
event handler for this element.void
setOnselect(java.lang.Object onselect)
Sets theonselect
event handler for this element.void
setOnselectionchange(java.lang.Object onselectionchange)
Sets theonselectionchange
event handler for this element.void
setOnselectstart(java.lang.Object onselectstart)
Sets theonselectstart
event handler for this element.void
setOnstalled(java.lang.Object onstalled)
Sets theonstalled
event handler for this element.void
setOnsubmit(java.lang.Object onsubmit)
Sets theonsubmit
event handler for this element.void
setOnsuspend(java.lang.Object onsuspend)
Sets theonsuspend
event handler for this element.void
setOntimeupdate(java.lang.Object ontimeupdate)
Sets theontimeupdate
event handler for this element.void
setOntoggle(java.lang.Object ontoggle)
Sets theontoggle
event handler for this element.void
setOnvolumechange(java.lang.Object onvolumechange)
Sets theonvolumechange
event handler for this element.void
setOnwaiting(java.lang.Object onwaiting)
Sets theonwaiting
event handler for this element.void
setOnwebkitfullscreenchange(java.lang.Object onwebkitfullscreenchange)
Sets theonwebkitfullscreenchange
event handler for this element.void
setOnwebkitfullscreenerror(java.lang.Object onwebkitfullscreenerror)
Sets theonwebkitfullscreenerror
event handler for this element.void
setOnwheel(java.lang.Object onwheel)
Sets theonwheel
event handler for this element.void
setTitle(java.lang.String title)
Sets this document's title.void
setVlinkColor(java.lang.String color)
Sets the value of thevlinkColor
property.void
setWindow(Window window)
Sets the Window JavaScript object that encloses this document.private static org.htmlunit.corejs.javascript.Scriptable
staticGetPrototype(Window window, java.lang.Class<? extends HtmlUnitScriptable> javaScriptClass)
-
Methods inherited from class org.htmlunit.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 thelastModified
attribute.- See Also:
- Constant Field Values
-
SUPPORTED_DOM2_EVENT_TYPE_MAP
private static final java.util.Map<java.lang.String,java.lang.Class<? extends Event>> SUPPORTED_DOM2_EVENT_TYPE_MAP
Contains all supported DOM level 2 events.
-
SUPPORTED_DOM3_EVENT_TYPE_MAP
private static final java.util.Map<java.lang.String,java.lang.Class<? extends Event>> SUPPORTED_DOM3_EVENT_TYPE_MAP
Contains all supported DOM level 3 events. DOM level 2 events are not included.
-
SUPPORTED_VENDOR_EVENT_TYPE_MAP
private static final java.util.Map<java.lang.String,java.lang.Class<? extends Event>> SUPPORTED_VENDOR_EVENT_TYPE_MAP
Contains all supported vendor specific events.
-
window_
private Window window_
-
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:
jsConstructor
in 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 thelocation
property.- Returns:
- the value of the
location
property
-
setLocation
public void setLocation(java.lang.String location) throws java.io.IOException
Sets the value of thelocation
property. The location's default property is "href", so setting "document.location='http://www.sf.net'" is equivalent to setting "document.location.href='http://www.sf.net'".- Parameters:
location
- the location to navigate to- Throws:
java.io.IOException
- when location loading fails- See Also:
- MSDN documentation
-
getReferrer
public java.lang.String getReferrer()
Returns the value of thereferrer
property.- Returns:
- the value of the
referrer
property
-
getDocumentElement
public Element getDocumentElement()
Gets the JavaScript propertydocumentElement
for 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 propertydoctype
for the document.- Returns:
- the DocumentType of the document
-
getDesignMode
public java.lang.String getDesignMode()
Returns a value which indicates whether or not the document can be edited.- Returns:
- a value which indicates whether or not the document can be edited
-
setDesignMode
public void setDesignMode(java.lang.String mode)
Sets a value which indicates whether or not the document can be edited.- Parameters:
mode
- a value which indicates whether or not the document can be edited
-
getPage
public SgmlPage getPage()
Returns the page that this document is modeling.- Returns:
- the page that this document is modeling
-
getDefaultView
public java.lang.Object getDefaultView()
Gets the window in which this document is contained.- Returns:
- the window
-
createDocumentFragment
public java.lang.Object createDocumentFragment()
Creates a new document fragment.- Returns:
- a newly created document fragment
-
createAttribute
public Attr createAttribute(java.lang.String attributeName)
Creates a new HTML attribute with the specified name.- Parameters:
attributeName
- the name of the attribute to create- Returns:
- an attribute with the specified name
-
importNode
public HtmlUnitScriptable importNode(Node importedNode, boolean deep)
Imports a node from another document to this document. The source node is not altered or removed from the original document; this method creates a new copy of the source node.- Parameters:
importedNode
- the node to 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 theactiveElement
property.- Returns:
- the value of the
activeElement
property - See Also:
- MSDN documentation
-
getCharacterSet
public java.lang.String getCharacterSet()
Returns the character encoding of the current document.- Returns:
- the character encoding of the current document
-
getCharset
public java.lang.String getCharset()
Retrieves the character set used to encode the document.- Returns:
- the character set used to encode the document
-
getAnchors
public java.lang.Object getAnchors()
Returns the value of the JavaScript 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'sbody
element.- Returns:
- this document's
body
element
-
setBody
public void setBody(HTMLElement htmlElement)
Sets thebody
element of the document.- Parameters:
htmlElement
- the new html element
-
close
public void close() throws java.io.IOException
JavaScript functionclose
.See http://www.whatwg.org/specs/web-apps/current-work/multipage/section-dynamic.html for a good description of the semantics of open(), write(), writeln() and close().
- Throws:
java.io.IOException
- if an IO problem occurs
-
getCompatMode
public java.lang.String getCompatMode()
Returns thecompatMode
property.- Returns:
- the
compatMode
property
-
getDocumentMode
public int getDocumentMode()
Returns thedocumentMode
property.- Returns:
- the
documentMode
property
-
isQuirksDocType
private boolean isQuirksDocType()
-
forceDocumentMode
public void forceDocumentMode(int documentMode)
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Called from the HTMLParser if a 'X-UA-Compatible' meta tag found.- Parameters:
documentMode
- the mode forced by the meta tag
-
querySelector
public Node querySelector(java.lang.String selectors)
Returns the first element within the document that matches the specified group of selectors.- Parameters:
selectors
- the selectors- Returns:
- null if no matches are found; otherwise, it returns the first matching element
-
querySelectorAll
public NodeList querySelectorAll(java.lang.String selectors)
Retrieves all element nodes from descendants of the starting element node that match any selector within the supplied selector strings. The NodeList object returned by the querySelectorAll() method must be static, not live.- Parameters:
selectors
- the selectors- Returns:
- the static node list
-
queryCommandSupported
public boolean queryCommandSupported(java.lang.String cmd)
Indicates if the command is supported.- Parameters:
cmd
- the command identifier- Returns:
true
if the command is supported- See Also:
- MSDN documentation
-
hasCommand
private boolean hasCommand(java.lang.String cmd, boolean includeBold)
-
queryCommandEnabled
public boolean queryCommandEnabled(java.lang.String cmd)
Indicates if the command can be successfully executed usingexecCommand
, given the current state of the document.- Parameters:
cmd
- the command identifier- Returns:
true
if the command can be successfully executed
-
execCommand
public boolean execCommand(java.lang.String cmd, boolean userInterface, java.lang.Object value)
Executes a command.- Parameters:
cmd
- the command 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:
true
if the command was successful,false
otherwise- See Also:
- MSDN documentation
-
getURL_js
public java.lang.String getURL_js()
Returns the value of theURL
property.- Returns:
- the value of the
URL
property
-
getDocumentURI
public java.lang.String getDocumentURI()
Returns the value of thedocumentURI
property.- Returns:
- the value of the
documentURI
property
-
getCookie
public java.lang.String getCookie()
Returns thecookie
property.- Returns:
- the
cookie
property
-
createEvent
public Event createEvent(java.lang.String eventType) throws org.w3c.dom.DOMException
Implementation of theDocumentEvent
interface'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 ofNodeFilter
filter
- an object implementing theNodeFilter
interface- Returns:
- a new NodeIterator object
-
createFilterWrapper
private static org.w3c.dom.traversal.NodeFilter createFilterWrapper(org.htmlunit.corejs.javascript.Scriptable filter, boolean filterFunctionOnly)
-
createTreeWalker
public java.lang.Object createTreeWalker(Node root, double whatToShow, org.htmlunit.corejs.javascript.Scriptable filter, boolean expandEntityReferences) throws org.w3c.dom.DOMException
Creates and returns a new TreeWalker. The following JavaScript parameters are passed into this method:- JavaScript param 1: The root node of the TreeWalker. Must not be
null
. - JavaScript param 2: Flag specifying which types of nodes appear in the logical view of the TreeWalker.
See
NodeFilter
for the set of possible Show_ values. - JavaScript param 3: The
NodeFilter
to be used with this TreeWalker, ornull
to indicate no filter. - JavaScript param 4: If
false
, the contents of EntityReference nodes are not present in the logical view.
- Parameters:
root
- the node which will serve as the root for the 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, ornull
if the server cannot be identified by a domain name.- Returns:
- the domain name of the server that served the document
- See Also:
- W3C documentation
-
setDomain
public void setDomain(java.lang.String newDomain)
Sets the domain of this document.Domains can only be set to suffixes of the existing domain with the exception of setting the domain to itself.
The domain will be set according to the following rules:
- 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 theonclick
event handler for this element.- Parameters:
handler
- theonclick
event handler for this element
-
getOnclick
public java.lang.Object getOnclick()
Returns theonclick
event handler for this element.- Returns:
- the
onclick
event handler for this element
-
setOndblclick
public void setOndblclick(java.lang.Object handler)
Sets theondblclick
event handler for this element.- Parameters:
handler
- theondblclick
event handler for this element
-
getOndblclick
public java.lang.Object getOndblclick()
Returns theondblclick
event handler for this element.- Returns:
- the
ondblclick
event handler for this element
-
setOnblur
public void setOnblur(java.lang.Object handler)
Sets theonblur
event handler for this element.- Parameters:
handler
- theonblur
event handler for this element
-
getOnblur
public java.lang.Object getOnblur()
Returns theonblur
event handler for this element.- Returns:
- the
onblur
event handler for this element
-
setOnfocus
public void setOnfocus(java.lang.Object handler)
Sets theonfocus
event handler for this element.- Parameters:
handler
- theonfocus
event handler for this element
-
getOnfocus
public java.lang.Object getOnfocus()
Returns theonfocus
event handler for this element.- Returns:
- the
onfocus
event handler for this element
-
setOnkeydown
public void setOnkeydown(java.lang.Object handler)
Sets theonkeydown
event handler for this element.- Parameters:
handler
- theonkeydown
event handler for this element
-
getOnkeydown
public java.lang.Object getOnkeydown()
Returns theonkeydown
event handler for this element.- Returns:
- the
onkeydown
event handler for this element
-
setOnkeypress
public void setOnkeypress(java.lang.Object handler)
Sets theonkeypress
event handler for this element.- Parameters:
handler
- theonkeypress
event handler for this element
-
getOnkeypress
public java.lang.Object getOnkeypress()
Returns theonkeypress
event handler for this element.- Returns:
- the
onkeypress
event handler for this element
-
setOnkeyup
public void setOnkeyup(java.lang.Object handler)
Sets theonkeyup
event handler for this element.- Parameters:
handler
- theonkeyup
event handler for this element
-
getOnkeyup
public java.lang.Object getOnkeyup()
Returns theonkeyup
event handler for this element.- Returns:
- the
onkeyup
event handler for this element
-
setOnmousedown
public void setOnmousedown(java.lang.Object handler)
Sets theonmousedown
event handler for this element.- Parameters:
handler
- theonmousedown
event handler for this element
-
getOnmousedown
public java.lang.Object getOnmousedown()
Returns theonmousedown
event handler for this element.- Returns:
- the
onmousedown
event handler for this element
-
setOnmousemove
public void setOnmousemove(java.lang.Object handler)
Sets theonmousemove
event handler for this element.- Parameters:
handler
- theonmousemove
event handler for this element
-
getOnmousemove
public java.lang.Object getOnmousemove()
Returns theonmousemove
event handler for this element.- Returns:
- the
onmousemove
event handler for this element
-
setOnmouseout
public void setOnmouseout(java.lang.Object handler)
Sets theonmouseout
event handler for this element.- Parameters:
handler
- theonmouseout
event handler for this element
-
getOnmouseout
public java.lang.Object getOnmouseout()
Returns theonmouseout
event handler for this element.- Returns:
- the
onmouseout
event handler for this element
-
setOnmouseover
public void setOnmouseover(java.lang.Object handler)
Sets theonmouseover
event handler for this element.- Parameters:
handler
- theonmouseover
event handler for this element
-
getOnmouseover
public java.lang.Object getOnmouseover()
Returns theonmouseover
event handler for this element.- Returns:
- the
onmouseover
event handler for this element
-
setOnmouseup
public void setOnmouseup(java.lang.Object handler)
Sets theonmouseup
event handler for this element.- Parameters:
handler
- theonmouseup
event handler for this element
-
getOnmouseup
public java.lang.Object getOnmouseup()
Returns theonmouseup
event handler for this element.- Returns:
- the
onmouseup
event handler for this element
-
setOncontextmenu
public void setOncontextmenu(java.lang.Object handler)
Sets theoncontextmenu
event handler for this element.- Parameters:
handler
- theoncontextmenu
event handler for this element
-
getOncontextmenu
public java.lang.Object getOncontextmenu()
Returns theoncontextmenu
event handler for this element.- Returns:
- the
oncontextmenu
event handler for this element
-
setOnresize
public void setOnresize(java.lang.Object handler)
Sets theonresize
event handler for this element.- Parameters:
handler
- theonresize
event handler for this element
-
getOnresize
public java.lang.Object getOnresize()
Returns theonresize
event handler for this element.- Returns:
- the
onresize
event handler for this element
-
setOnerror
public void setOnerror(java.lang.Object handler)
Sets theonerror
event handler for this element.- Parameters:
handler
- theonerror
event handler for this element
-
getOnerror
public java.lang.Object getOnerror()
Returns theonerror
event handler for this element.- Returns:
- the
onerror
event handler for this element
-
getOninput
public org.htmlunit.corejs.javascript.Function getOninput()
Returns theoninput
event handler for this element.- Returns:
- the
oninput
event handler for this element
-
setOninput
public void setOninput(java.lang.Object oninput)
Sets theoninput
event handler for this element.- Parameters:
oninput
- theoninput
event handler for this element
-
getHidden
public boolean getHidden()
Returns thehidden
property.- Returns:
- the
hidden
property
-
getChildElementCount
public int getChildElementCount()
Returns the current number of child elements.- Overrides:
getChildElementCount
in 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 theforms
property.- Returns:
- the value of the
forms
property
-
getEmbeds
public java.lang.Object getEmbeds()
Returns the value of theembeds
property.- Returns:
- the value of the
embeds
property
-
getImages
public java.lang.Object getImages()
Returns the value of theembeds
property.- Returns:
- the value of the
embeds
property
-
getScripts
public java.lang.Object getScripts()
Returns the value of thescripts
property.- Returns:
- the value of the
scripts
property
-
getStyleSheets
public StyleSheetList getStyleSheets()
Retrieves a collection of stylesheet objects representing the style sheets that correspond to each instance of a Link orCSSStyleDeclaration
object in the document.- Returns:
- styleSheet collection
-
getPlugins
public java.lang.Object getPlugins()
Returns the value of theplugins
property.- Returns:
- the value of the
plugins
property
-
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 aname
attribute with the specified value.Refer to The DOM spec for details.
- Parameters:
elementName
- - value of thename
attribute to look for- Returns:
- all HTML elements that have a
name
attribute with the specified value
-
hasFocus
public boolean hasFocus()
Returnsfalse
if the active element in the document has no focus;true
if the active element in the document has focus.- Returns:
- whether the active element in the document has focus or not
-
getTitle
public java.lang.String getTitle()
Returns this document's title.- Returns:
- this document's title
-
setTitle
public void setTitle(java.lang.String title)
Sets this document's title.- Parameters:
title
- the new title
-
getChildren
public HTMLCollection getChildren()
Gets the children of the current node.- Overrides:
getChildren
in classNode
- Returns:
- the child at the given position
- See Also:
- MSDN documentation
-
getContentType
public java.lang.String getContentType()
Returns thecontentType
property.- Returns:
- the
contentType
property
-
getSelection
public Selection getSelection()
Returns the current selection.- Returns:
- the current selection
-
getHead
public java.lang.Object getHead()
Returns this document'shead
element.- Returns:
- this document's
head
element
-
getInputEncoding
public java.lang.String getInputEncoding()
Returns a string representing the encoding under which the document was parsed.- Returns:
- a string representing the encoding under which the document was parsed
-
getLastModified
public java.lang.String getLastModified()
Returns the last modification date of the document.- Returns:
- the date as string
- See Also:
- Mozilla documentation
-
parseDateOrNow
private static java.util.Date parseDateOrNow(java.lang.String stringDate)
-
releaseCapture
public void releaseCapture()
Mock for the moment.
-
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 thealinkColor
property.- Returns:
- the value of the
alinkColor
property
-
setAlinkColor
public void setAlinkColor(java.lang.String color)
Sets the value of thealinkColor
property.- Parameters:
color
- the value of thealinkColor
property
-
getBgColor
public java.lang.String getBgColor()
Returns the value of thebgColor
property.- Returns:
- the value of the
bgColor
property - See Also:
- MSDN Documentation
-
setBgColor
public void setBgColor(java.lang.String color)
Sets the value of thebgColor
property.- Parameters:
color
- the value of thebgColor
property- See Also:
- MSDN Documentation
-
getFgColor
public java.lang.String getFgColor()
Returns the value of thefgColor
property.- Returns:
- the value of the
fgColor
property
-
setFgColor
public void setFgColor(java.lang.String color)
Sets the value of thefgColor
property.- Parameters:
color
- the value of thefgColor
property
-
getLinkColor
public java.lang.String getLinkColor()
Returns the value of thelinkColor
property.- Returns:
- the value of the
linkColor
property
-
setLinkColor
public void setLinkColor(java.lang.String color)
Sets the value of thelinkColor
property.- Parameters:
color
- the value of thelinkColor
property
-
getVlinkColor
public java.lang.String getVlinkColor()
Returns the value of thevlinkColor
property.- Returns:
- the value of the
vlinkColor
property
-
setVlinkColor
public void setVlinkColor(java.lang.String color)
Sets the value of thevlinkColor
property.- Parameters:
color
- the value of thevlinkColor
property
-
getLastElementChild
public Element getLastElementChild()
Returns the last element child.- Overrides:
getLastElementChild
in classNode
- Returns:
- the last element child
-
getFirstElementChild
public Element getFirstElementChild()
Returns the first element child.- Overrides:
getFirstElementChild
in classNode
- Returns:
- the first element child
-
getXmlEncoding
public java.lang.String getXmlEncoding()
Returns thexmlEncoding
property.- Returns:
- the
xmlEncoding
property
-
isXmlStandalone
public boolean isXmlStandalone()
Returns thexmlStandalone
property.- Returns:
- the
xmlStandalone
property
-
getXmlVersion
public java.lang.String getXmlVersion()
Returns thexmlVersion
property.- Returns:
- the
xmlVersion
property
-
getOnabort
public org.htmlunit.corejs.javascript.Function getOnabort()
Returns theonabort
event handler for this element.- Returns:
- the
onabort
event handler for this element
-
setOnabort
public void setOnabort(java.lang.Object onabort)
Sets theonabort
event handler for this element.- Parameters:
onabort
- theonabort
event handler for this element
-
getOnauxclick
public org.htmlunit.corejs.javascript.Function getOnauxclick()
Returns theonauxclick
event handler for this element.- Returns:
- the
onauxclick
event handler for this element
-
setOnauxclick
public void setOnauxclick(java.lang.Object onauxclick)
Sets theonauxclick
event handler for this element.- Parameters:
onauxclick
- theonauxclick
event handler for this element
-
getOnbeforecopy
public org.htmlunit.corejs.javascript.Function getOnbeforecopy()
Returns theonbeforecopy
event handler for this element.- Returns:
- the
onbeforecopy
event handler for this element
-
setOnbeforecopy
public void setOnbeforecopy(java.lang.Object onbeforecopy)
Sets theonbeforecopy
event handler for this element.- Parameters:
onbeforecopy
- theonbeforecopy
event handler for this element
-
getOnbeforecut
public org.htmlunit.corejs.javascript.Function getOnbeforecut()
Returns theonbeforecut
event handler for this element.- Returns:
- the
onbeforecut
event handler for this element
-
setOnbeforecut
public void setOnbeforecut(java.lang.Object onbeforecut)
Sets theonbeforecut
event handler for this element.- Parameters:
onbeforecut
- theonbeforecut
event handler for this element
-
getOnbeforepaste
public org.htmlunit.corejs.javascript.Function getOnbeforepaste()
Returns theonbeforepaste
event handler for this element.- Returns:
- the
onbeforepaste
event handler for this element
-
setOnbeforepaste
public void setOnbeforepaste(java.lang.Object onbeforepaste)
Sets theonbeforepaste
event handler for this element.- Parameters:
onbeforepaste
- theonbeforepaste
event handler for this element
-
getOncancel
public org.htmlunit.corejs.javascript.Function getOncancel()
Returns theoncancel
event handler for this element.- Returns:
- the
oncancel
event handler for this element
-
setOncancel
public void setOncancel(java.lang.Object oncancel)
Sets theoncancel
event handler for this element.- Parameters:
oncancel
- theoncancel
event handler for this element
-
getOncanplay
public org.htmlunit.corejs.javascript.Function getOncanplay()
Returns theoncanplay
event handler for this element.- Returns:
- the
oncanplay
event handler for this element
-
setOncanplay
public void setOncanplay(java.lang.Object oncanplay)
Sets theoncanplay
event handler for this element.- Parameters:
oncanplay
- theoncanplay
event handler for this element
-
getOncanplaythrough
public org.htmlunit.corejs.javascript.Function getOncanplaythrough()
Returns theoncanplaythrough
event handler for this element.- Returns:
- the
oncanplaythrough
event handler for this element
-
setOncanplaythrough
public void setOncanplaythrough(java.lang.Object oncanplaythrough)
Sets theoncanplaythrough
event handler for this element.- Parameters:
oncanplaythrough
- theoncanplaythrough
event handler for this element
-
getOnchange
public org.htmlunit.corejs.javascript.Function getOnchange()
Returns theonchange
event handler for this element.- Returns:
- the
onchange
event handler for this element
-
setOnchange
public void setOnchange(java.lang.Object onchange)
Sets theonchange
event handler for this element.- Parameters:
onchange
- theonchange
event handler for this element
-
getOnclose
public org.htmlunit.corejs.javascript.Function getOnclose()
Returns theonclose
event handler for this element.- Returns:
- the
onclose
event handler for this element
-
setOnclose
public void setOnclose(java.lang.Object onclose)
Sets theonclose
event handler for this element.- Parameters:
onclose
- theonclose
event handler for this element
-
getOncopy
public org.htmlunit.corejs.javascript.Function getOncopy()
Returns theoncopy
event handler for this element.- Returns:
- the
oncopy
event handler for this element
-
setOncopy
public void setOncopy(java.lang.Object oncopy)
Sets theoncopy
event handler for this element.- Parameters:
oncopy
- theoncopy
event handler for this element
-
getOncuechange
public org.htmlunit.corejs.javascript.Function getOncuechange()
Returns theoncuechange
event handler for this element.- Returns:
- the
oncuechange
event handler for this element
-
setOncuechange
public void setOncuechange(java.lang.Object oncuechange)
Sets theoncuechange
event handler for this element.- Parameters:
oncuechange
- theoncuechange
event handler for this element
-
getOncut
public org.htmlunit.corejs.javascript.Function getOncut()
Returns theoncut
event handler for this element.- Returns:
- the
oncut
event handler for this element
-
setOncut
public void setOncut(java.lang.Object oncut)
Sets theoncut
event handler for this element.- Parameters:
oncut
- theoncut
event handler for this element
-
getOndrag
public org.htmlunit.corejs.javascript.Function getOndrag()
Returns theondrag
event handler for this element.- Returns:
- the
ondrag
event handler for this element
-
setOndrag
public void setOndrag(java.lang.Object ondrag)
Sets theondrag
event handler for this element.- Parameters:
ondrag
- theondrag
event handler for this element
-
getOndragend
public org.htmlunit.corejs.javascript.Function getOndragend()
Returns theondragend
event handler for this element.- Returns:
- the
ondragend
event handler for this element
-
setOndragend
public void setOndragend(java.lang.Object ondragend)
Sets theondragend
event handler for this element.- Parameters:
ondragend
- theondragend
event handler for this element
-
getOndragenter
public org.htmlunit.corejs.javascript.Function getOndragenter()
Returns theondragenter
event handler for this element.- Returns:
- the
ondragenter
event handler for this element
-
setOndragenter
public void setOndragenter(java.lang.Object ondragenter)
Sets theondragenter
event handler for this element.- Parameters:
ondragenter
- theondragenter
event handler for this element
-
getOndragleave
public org.htmlunit.corejs.javascript.Function getOndragleave()
Returns theondragleave
event handler for this element.- Returns:
- the
ondragleave
event handler for this element
-
setOndragleave
public void setOndragleave(java.lang.Object ondragleave)
Sets theondragleave
event handler for this element.- Parameters:
ondragleave
- theondragleave
event handler for this element
-
getOndragover
public org.htmlunit.corejs.javascript.Function getOndragover()
Returns theondragover
event handler for this element.- Returns:
- the
ondragover
event handler for this element
-
setOndragover
public void setOndragover(java.lang.Object ondragover)
Sets theondragover
event handler for this element.- Parameters:
ondragover
- theondragover
event handler for this element
-
getOndragstart
public org.htmlunit.corejs.javascript.Function getOndragstart()
Returns theondragstart
event handler for this element.- Returns:
- the
ondragstart
event handler for this element
-
setOndragstart
public void setOndragstart(java.lang.Object ondragstart)
Sets theondragstart
event handler for this element.- Parameters:
ondragstart
- theondragstart
event handler for this element
-
getOndrop
public org.htmlunit.corejs.javascript.Function getOndrop()
Returns theondrop
event handler for this element.- Returns:
- the
ondrop
event handler for this element
-
setOndrop
public void setOndrop(java.lang.Object ondrop)
Sets theondrop
event handler for this element.- Parameters:
ondrop
- theondrop
event handler for this element
-
getOndurationchange
public org.htmlunit.corejs.javascript.Function getOndurationchange()
Returns theondurationchange
event handler for this element.- Returns:
- the
ondurationchange
event handler for this element
-
setOndurationchange
public void setOndurationchange(java.lang.Object ondurationchange)
Sets theondurationchange
event handler for this element.- Parameters:
ondurationchange
- theondurationchange
event handler for this element
-
getOnemptied
public org.htmlunit.corejs.javascript.Function getOnemptied()
Returns theonemptied
event handler for this element.- Returns:
- the
onemptied
event handler for this element
-
setOnemptied
public void setOnemptied(java.lang.Object onemptied)
Sets theonemptied
event handler for this element.- Parameters:
onemptied
- theonemptied
event handler for this element
-
getOnended
public org.htmlunit.corejs.javascript.Function getOnended()
Returns theonended
event handler for this element.- Returns:
- the
onended
event handler for this element
-
setOnended
public void setOnended(java.lang.Object onended)
Sets theonended
event handler for this element.- Parameters:
onended
- theonended
event handler for this element
-
getOngotpointercapture
public org.htmlunit.corejs.javascript.Function getOngotpointercapture()
Returns theongotpointercapture
event handler for this element.- Returns:
- the
ongotpointercapture
event handler for this element
-
setOngotpointercapture
public void setOngotpointercapture(java.lang.Object ongotpointercapture)
Sets theongotpointercapture
event handler for this element.- Parameters:
ongotpointercapture
- theongotpointercapture
event handler for this element
-
getOninvalid
public org.htmlunit.corejs.javascript.Function getOninvalid()
Returns theoninvalid
event handler for this element.- Returns:
- the
oninvalid
event handler for this element
-
setOninvalid
public void setOninvalid(java.lang.Object oninvalid)
Sets theoninvalid
event handler for this element.- Parameters:
oninvalid
- theoninvalid
event handler for this element
-
getOnload
public org.htmlunit.corejs.javascript.Function getOnload()
Returns theonload
event handler for this element.- Returns:
- the
onload
event handler for this element
-
setOnload
public void setOnload(java.lang.Object onload)
Sets theonload
event handler for this element.- Parameters:
onload
- theonload
event handler for this element
-
getOnloadeddata
public org.htmlunit.corejs.javascript.Function getOnloadeddata()
Returns theonloadeddata
event handler for this element.- Returns:
- the
onloadeddata
event handler for this element
-
setOnloadeddata
public void setOnloadeddata(java.lang.Object onloadeddata)
Sets theonloadeddata
event handler for this element.- Parameters:
onloadeddata
- theonloadeddata
event handler for this element
-
getOnloadedmetadata
public org.htmlunit.corejs.javascript.Function getOnloadedmetadata()
Returns theonloadedmetadata
event handler for this element.- Returns:
- the
onloadedmetadata
event handler for this element
-
setOnloadedmetadata
public void setOnloadedmetadata(java.lang.Object onloadedmetadata)
Sets theonloadedmetadata
event handler for this element.- Parameters:
onloadedmetadata
- theonloadedmetadata
event handler for this element
-
getOnloadstart
public org.htmlunit.corejs.javascript.Function getOnloadstart()
Returns theonloadstart
event handler for this element.- Returns:
- the
onloadstart
event handler for this element
-
setOnloadstart
public void setOnloadstart(java.lang.Object onloadstart)
Sets theonloadstart
event handler for this element.- Parameters:
onloadstart
- theonloadstart
event handler for this element
-
getOnlostpointercapture
public org.htmlunit.corejs.javascript.Function getOnlostpointercapture()
Returns theonlostpointercapture
event handler for this element.- Returns:
- the
onlostpointercapture
event handler for this element
-
setOnlostpointercapture
public void setOnlostpointercapture(java.lang.Object onlostpointercapture)
Sets theonlostpointercapture
event handler for this element.- Parameters:
onlostpointercapture
- theonlostpointercapture
event handler for this element
-
getOnmouseenter
public org.htmlunit.corejs.javascript.Function getOnmouseenter()
Returns theonmouseenter
event handler for this element.- Returns:
- the
onmouseenter
event handler for this element
-
setOnmouseenter
public void setOnmouseenter(java.lang.Object onmouseenter)
Sets theonmouseenter
event handler for this element.- Parameters:
onmouseenter
- theonmouseenter
event handler for this element
-
getOnmouseleave
public org.htmlunit.corejs.javascript.Function getOnmouseleave()
Returns theonmouseleave
event handler for this element.- Returns:
- the
onmouseleave
event handler for this element
-
setOnmouseleave
public void setOnmouseleave(java.lang.Object onmouseleave)
Sets theonmouseleave
event handler for this element.- Parameters:
onmouseleave
- theonmouseleave
event handler for this element
-
getOnmousewheel
public org.htmlunit.corejs.javascript.Function getOnmousewheel()
Returns theonmousewheel
event handler for this element.- Returns:
- the
onmousewheel
event handler for this element
-
setOnmousewheel
public void setOnmousewheel(java.lang.Object onmousewheel)
Sets theonmousewheel
event handler for this element.- Parameters:
onmousewheel
- theonmousewheel
event handler for this element
-
getOnpaste
public org.htmlunit.corejs.javascript.Function getOnpaste()
Returns theonpaste
event handler for this element.- Returns:
- the
onpaste
event handler for this element
-
setOnpaste
public void setOnpaste(java.lang.Object onpaste)
Sets theonpaste
event handler for this element.- Parameters:
onpaste
- theonpaste
event handler for this element
-
getOnpause
public org.htmlunit.corejs.javascript.Function getOnpause()
Returns theonpause
event handler for this element.- Returns:
- the
onpause
event handler for this element
-
setOnpause
public void setOnpause(java.lang.Object onpause)
Sets theonpause
event handler for this element.- Parameters:
onpause
- theonpause
event handler for this element
-
getOnplay
public org.htmlunit.corejs.javascript.Function getOnplay()
Returns theonplay
event handler for this element.- Returns:
- the
onplay
event handler for this element
-
setOnplay
public void setOnplay(java.lang.Object onplay)
Sets theonplay
event handler for this element.- Parameters:
onplay
- theonplay
event handler for this element
-
getOnplaying
public org.htmlunit.corejs.javascript.Function getOnplaying()
Returns theonplaying
event handler for this element.- Returns:
- the
onplaying
event handler for this element
-
setOnplaying
public void setOnplaying(java.lang.Object onplaying)
Sets theonplaying
event handler for this element.- Parameters:
onplaying
- theonplaying
event handler for this element
-
getOnpointercancel
public org.htmlunit.corejs.javascript.Function getOnpointercancel()
Returns theonpointercancel
event handler for this element.- Returns:
- the
onpointercancel
event handler for this element
-
setOnpointercancel
public void setOnpointercancel(java.lang.Object onpointercancel)
Sets theonpointercancel
event handler for this element.- Parameters:
onpointercancel
- theonpointercancel
event handler for this element
-
getOnpointerdown
public org.htmlunit.corejs.javascript.Function getOnpointerdown()
Returns theonpointerdown
event handler for this element.- Returns:
- the
onpointerdown
event handler for this element
-
setOnpointerdown
public void setOnpointerdown(java.lang.Object onpointerdown)
Sets theonpointerdown
event handler for this element.- Parameters:
onpointerdown
- theonpointerdown
event handler for this element
-
getOnpointerenter
public org.htmlunit.corejs.javascript.Function getOnpointerenter()
Returns theonpointerenter
event handler for this element.- Returns:
- the
onpointerenter
event handler for this element
-
setOnpointerenter
public void setOnpointerenter(java.lang.Object onpointerenter)
Sets theonpointerenter
event handler for this element.- Parameters:
onpointerenter
- theonpointerenter
event handler for this element
-
getOnpointerleave
public org.htmlunit.corejs.javascript.Function getOnpointerleave()
Returns theonpointerleave
event handler for this element.- Returns:
- the
onpointerleave
event handler for this element
-
setOnpointerleave
public void setOnpointerleave(java.lang.Object onpointerleave)
Sets theonpointerleave
event handler for this element.- Parameters:
onpointerleave
- theonpointerleave
event handler for this element
-
getOnpointerlockchange
public org.htmlunit.corejs.javascript.Function getOnpointerlockchange()
Returns theonpointerlockchange
event handler for this element.- Returns:
- the
onpointerlockchange
event handler for this element
-
setOnpointerlockchange
public void setOnpointerlockchange(java.lang.Object onpointerlockchange)
Sets theonpointerlockchange
event handler for this element.- Parameters:
onpointerlockchange
- theonpointerlockchange
event handler for this element
-
getOnpointerlockerror
public org.htmlunit.corejs.javascript.Function getOnpointerlockerror()
Returns theonpointerlockerror
event handler for this element.- Returns:
- the
onpointerlockerror
event handler for this element
-
setOnpointerlockerror
public void setOnpointerlockerror(java.lang.Object onpointerlockerror)
Sets theonpointerlockerror
event handler for this element.- Parameters:
onpointerlockerror
- theonpointerlockerror
event handler for this element
-
getOnpointermove
public org.htmlunit.corejs.javascript.Function getOnpointermove()
Returns theonpointermove
event handler for this element.- Returns:
- the
onpointermove
event handler for this element
-
setOnpointermove
public void setOnpointermove(java.lang.Object onpointermove)
Sets theonpointermove
event handler for this element.- Parameters:
onpointermove
- theonpointermove
event handler for this element
-
getOnpointerout
public org.htmlunit.corejs.javascript.Function getOnpointerout()
Returns theonpointerout
event handler for this element.- Returns:
- the
onpointerout
event handler for this element
-
setOnpointerout
public void setOnpointerout(java.lang.Object onpointerout)
Sets theonpointerout
event handler for this element.- Parameters:
onpointerout
- theonpointerout
event handler for this element
-
getOnpointerover
public org.htmlunit.corejs.javascript.Function getOnpointerover()
Returns theonpointerover
event handler for this element.- Returns:
- the
onpointerover
event handler for this element
-
setOnpointerover
public void setOnpointerover(java.lang.Object onpointerover)
Sets theonpointerover
event handler for this element.- Parameters:
onpointerover
- theonpointerover
event handler for this element
-
getOnpointerup
public org.htmlunit.corejs.javascript.Function getOnpointerup()
Returns theonpointerup
event handler for this element.- Returns:
- the
onpointerup
event handler for this element
-
setOnpointerup
public void setOnpointerup(java.lang.Object onpointerup)
Sets theonpointerup
event handler for this element.- Parameters:
onpointerup
- theonpointerup
event handler for this element
-
getOnprogress
public org.htmlunit.corejs.javascript.Function getOnprogress()
Returns theonprogress
event handler for this element.- Returns:
- the
onprogress
event handler for this element
-
setOnprogress
public void setOnprogress(java.lang.Object onprogress)
Sets theonprogress
event handler for this element.- Parameters:
onprogress
- theonprogress
event handler for this element
-
getOnratechange
public org.htmlunit.corejs.javascript.Function getOnratechange()
Returns theonratechange
event handler for this element.- Returns:
- the
onratechange
event handler for this element
-
setOnratechange
public void setOnratechange(java.lang.Object onratechange)
Sets theonratechange
event handler for this element.- Parameters:
onratechange
- theonratechange
event handler for this element
-
getOnreadystatechange
public org.htmlunit.corejs.javascript.Function getOnreadystatechange()
Returns theonreadystatechange
event handler for this element.- Returns:
- the
onreadystatechange
event handler for this element
-
setOnreadystatechange
public void setOnreadystatechange(java.lang.Object onreadystatechange)
Sets theonreadystatechange
event handler for this element.- Parameters:
onreadystatechange
- theonreadystatechange
event handler for this element
-
getOnreset
public org.htmlunit.corejs.javascript.Function getOnreset()
Returns theonreset
event handler for this element.- Returns:
- the
onreset
event handler for this element
-
setOnreset
public void setOnreset(java.lang.Object onreset)
Sets theonreset
event handler for this element.- Parameters:
onreset
- theonreset
event handler for this element
-
getOnscroll
public org.htmlunit.corejs.javascript.Function getOnscroll()
Returns theonscroll
event handler for this element.- Returns:
- the
onscroll
event handler for this element
-
setOnscroll
public void setOnscroll(java.lang.Object onscroll)
Sets theonscroll
event handler for this element.- Parameters:
onscroll
- theonscroll
event handler for this element
-
getOnsearch
public org.htmlunit.corejs.javascript.Function getOnsearch()
Returns theonsearch
event handler for this element.- Returns:
- the
onsearch
event handler for this element
-
setOnsearch
public void setOnsearch(java.lang.Object onsearch)
Sets theonsearch
event handler for this element.- Parameters:
onsearch
- theonsearch
event handler for this element
-
getOnseeked
public org.htmlunit.corejs.javascript.Function getOnseeked()
Returns theonseeked
event handler for this element.- Returns:
- the
onseeked
event handler for this element
-
setOnseeked
public void setOnseeked(java.lang.Object onseeked)
Sets theonseeked
event handler for this element.- Parameters:
onseeked
- theonseeked
event handler for this element
-
getOnseeking
public org.htmlunit.corejs.javascript.Function getOnseeking()
Returns theonseeking
event handler for this element.- Returns:
- the
onseeking
event handler for this element
-
setOnseeking
public void setOnseeking(java.lang.Object onseeking)
Sets theonseeking
event handler for this element.- Parameters:
onseeking
- theonseeking
event handler for this element
-
getOnselect
public org.htmlunit.corejs.javascript.Function getOnselect()
Returns theonselect
event handler for this element.- Returns:
- the
onselect
event handler for this element
-
setOnselect
public void setOnselect(java.lang.Object onselect)
Sets theonselect
event handler for this element.- Parameters:
onselect
- theonselect
event handler for this element
-
getOnselectionchange
public org.htmlunit.corejs.javascript.Function getOnselectionchange()
Returns theonselectionchange
event handler for this element.- Returns:
- the
onselectionchange
event handler for this element
-
setOnselectionchange
public void setOnselectionchange(java.lang.Object onselectionchange)
Sets theonselectionchange
event handler for this element.- Parameters:
onselectionchange
- theonselectionchange
event handler for this element
-
getOnselectstart
public org.htmlunit.corejs.javascript.Function getOnselectstart()
Returns theonselectstart
event handler for this element.- Returns:
- the
onselectstart
event handler for this element
-
setOnselectstart
public void setOnselectstart(java.lang.Object onselectstart)
Sets theonselectstart
event handler for this element.- Parameters:
onselectstart
- theonselectstart
event handler for this element
-
getOnstalled
public org.htmlunit.corejs.javascript.Function getOnstalled()
Returns theonstalled
event handler for this element.- Returns:
- the
onstalled
event handler for this element
-
setOnstalled
public void setOnstalled(java.lang.Object onstalled)
Sets theonstalled
event handler for this element.- Parameters:
onstalled
- theonstalled
event handler for this element
-
getOnsubmit
public org.htmlunit.corejs.javascript.Function getOnsubmit()
Returns theonsubmit
event handler for this element.- Returns:
- the
onsubmit
event handler for this element
-
setOnsubmit
public void setOnsubmit(java.lang.Object onsubmit)
Sets theonsubmit
event handler for this element.- Parameters:
onsubmit
- theonsubmit
event handler for this element
-
getOnsuspend
public org.htmlunit.corejs.javascript.Function getOnsuspend()
Returns theonsuspend
event handler for this element.- Returns:
- the
onsuspend
event handler for this element
-
setOnsuspend
public void setOnsuspend(java.lang.Object onsuspend)
Sets theonsuspend
event handler for this element.- Parameters:
onsuspend
- theonsuspend
event handler for this element
-
getOntimeupdate
public org.htmlunit.corejs.javascript.Function getOntimeupdate()
Returns theontimeupdate
event handler for this element.- Returns:
- the
ontimeupdate
event handler for this element
-
setOntimeupdate
public void setOntimeupdate(java.lang.Object ontimeupdate)
Sets theontimeupdate
event handler for this element.- Parameters:
ontimeupdate
- theontimeupdate
event handler for this element
-
getOntoggle
public org.htmlunit.corejs.javascript.Function getOntoggle()
Returns theontoggle
event handler for this element.- Returns:
- the
ontoggle
event handler for this element
-
setOntoggle
public void setOntoggle(java.lang.Object ontoggle)
Sets theontoggle
event handler for this element.- Parameters:
ontoggle
- theontoggle
event handler for this element
-
getOnvolumechange
public org.htmlunit.corejs.javascript.Function getOnvolumechange()
Returns theonvolumechange
event handler for this element.- Returns:
- the
onvolumechange
event handler for this element
-
setOnvolumechange
public void setOnvolumechange(java.lang.Object onvolumechange)
Sets theonvolumechange
event handler for this element.- Parameters:
onvolumechange
- theonvolumechange
event handler for this element
-
getOnwaiting
public org.htmlunit.corejs.javascript.Function getOnwaiting()
Returns theonwaiting
event handler for this element.- Returns:
- the
onwaiting
event handler for this element
-
setOnwaiting
public void setOnwaiting(java.lang.Object onwaiting)
Sets theonwaiting
event handler for this element.- Parameters:
onwaiting
- theonwaiting
event handler for this element
-
getOnwebkitfullscreenchange
public org.htmlunit.corejs.javascript.Function getOnwebkitfullscreenchange()
Returns theonwebkitfullscreenchange
event handler for this element.- Returns:
- the
onwebkitfullscreenchange
event handler for this element
-
setOnwebkitfullscreenchange
public void setOnwebkitfullscreenchange(java.lang.Object onwebkitfullscreenchange)
Sets theonwebkitfullscreenchange
event handler for this element.- Parameters:
onwebkitfullscreenchange
- theonwebkitfullscreenchange
event handler for this element
-
getOnwebkitfullscreenerror
public org.htmlunit.corejs.javascript.Function getOnwebkitfullscreenerror()
Returns theonwebkitfullscreenerror
event handler for this element.- Returns:
- the
onwebkitfullscreenerror
event handler for this element
-
setOnwebkitfullscreenerror
public void setOnwebkitfullscreenerror(java.lang.Object onwebkitfullscreenerror)
Sets theonwebkitfullscreenerror
event handler for this element.- Parameters:
onwebkitfullscreenerror
- theonwebkitfullscreenerror
event handler for this element
-
getOnwheel
public org.htmlunit.corejs.javascript.Function getOnwheel()
Returns theonwheel
event handler for this element.- Returns:
- the
onwheel
event handler for this element
-
setOnwheel
public void setOnwheel(java.lang.Object onwheel)
Sets theonwheel
event handler for this element.- Parameters:
onwheel
- theonwheel
event handler for this element
-
getOnafterscriptexecute
public org.htmlunit.corejs.javascript.Function getOnafterscriptexecute()
Returns theonafterscriptexecute
event handler for this element.- Returns:
- the
onafterscriptexecute
event handler for this element
-
setOnafterscriptexecute
public void setOnafterscriptexecute(java.lang.Object onafterscriptexecute)
Sets theonafterscriptexecute
event handler for this element.- Parameters:
onafterscriptexecute
- theonafterscriptexecute
event handler for this element
-
getOnbeforescriptexecute
public org.htmlunit.corejs.javascript.Function getOnbeforescriptexecute()
Returns theonbeforescriptexecute
event handler for this element.- Returns:
- the
onbeforescriptexecute
event handler for this element
-
setOnbeforescriptexecute
public void setOnbeforescriptexecute(java.lang.Object onbeforescriptexecute)
Sets theonbeforescriptexecute
event handler for this element.- Parameters:
onbeforescriptexecute
- theonbeforescriptexecute
event handler for this element
-
getOnmozfullscreenchange
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenchange()
Returns theonmozfullscreenchange
event handler for this element.- Returns:
- the
onmozfullscreenchange
event handler for this element
-
setOnmozfullscreenchange
public void setOnmozfullscreenchange(java.lang.Object onmozfullscreenchange)
Sets theonmozfullscreenchange
event handler for this element.- Parameters:
onmozfullscreenchange
- theonmozfullscreenchange
event handler for this element
-
getOnmozfullscreenerror
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenerror()
Returns theonmozfullscreenerror
event handler for this element.- Returns:
- the
onmozfullscreenerror
event handler for this element
-
setOnmozfullscreenerror
public void setOnmozfullscreenerror(java.lang.Object onmozfullscreenerror)
Sets theonmozfullscreenerror
event handler for this element.- Parameters:
onmozfullscreenerror
- theonmozfullscreenerror
event handler for this element
-
getCurrentScript
public org.htmlunit.corejs.javascript.ScriptableObject getCurrentScript()
- Returns:
- the
currentScript
-
setCurrentScript
public void setCurrentScript(org.htmlunit.corejs.javascript.ScriptableObject script)
- Parameters:
script
- thecurrentScript
-
getFonts
public org.htmlunit.corejs.javascript.ScriptableObject getFonts()
- Returns:
- the
FontFaceSet
-
getAll
public HTMLCollection getAll()
Returns the value of theall
property.- Returns:
- the value of the
all
property
-
getElementById
public HtmlUnitScriptable getElementById(java.lang.String id)
Returns the element with the specified ID, as long as it is an HTML element;null
otherwise.- Parameters:
id
- the ID to search for- Returns:
- the element with the specified ID, as long as it is an HTML element;
null
otherwise
-
createProcessingInstruction
public java.lang.Object createProcessingInstruction(java.lang.String target, java.lang.String data)
Creates a new ProcessingInstruction.- Parameters:
target
- the 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
null
if 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)
-
-