Package org.htmlunit.javascript.host
Class Window
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.javascript.HtmlUnitScriptable
-
- org.htmlunit.javascript.host.event.EventTarget
-
- org.htmlunit.javascript.host.Window
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.AutoCloseable
,java.lang.Cloneable
,org.htmlunit.corejs.javascript.ConstProperties
,org.htmlunit.corejs.javascript.debug.DebuggableObject
,org.htmlunit.corejs.javascript.Scriptable
,org.htmlunit.corejs.javascript.SymbolScriptable
,WindowOrWorkerGlobalScope
public class Window extends EventTarget implements WindowOrWorkerGlobalScope, java.lang.AutoCloseable
A JavaScript object forWindow
.- See Also:
- MSDN documentation, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
Window.AnimationFrame
private static class
Window.Filter
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Window.AnimationFrame>
animationFrames_
private java.lang.Object
clientInformation_
private java.lang.Object
controllers_
private Crypto
crypto_
private Event
currentEvent_
private Document
document_
private DocumentProxy
documentProxy_
private History
history_
private Location
location_
private static org.apache.commons.logging.Log
LOG
private Navigator
navigator_
private java.lang.Object
opener_
static int
PERSISTENT
To be documented.private java.util.Map<java.lang.Class<? extends org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable>
prototypes_
private Screen
screen_
private Selection
selection_
private java.lang.String
status_
private java.util.EnumMap<StorageHolder.Type,Storage>
storages_
static int
TEMPORARY
To be documented.private java.lang.Object
top_
private WebWindow
webWindow_
private WindowProxy
windowProxy_
-
Constructor Summary
Constructors Constructor Description Window()
Creates an instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
alert(java.lang.Object message)
The JavaScript functionalert()
.int
animateAnimationsFrames()
Invokes all the animation callbacks registered for this window by callingrequestAnimationFrame(Object)
once.java.lang.String
atob(java.lang.String encodedData)
Decodes a string of data which has been encoded using base-64 encoding.void
blur()
Removes focus from this element.java.lang.String
btoa(java.lang.String stringToEncode)
Creates a base-64 encoded ASCII string from a string of binary data.void
cancelAnimationFrame(java.lang.Object requestId)
Remove the callback from the list of animationFrames.void
captureEvents(java.lang.String type)
Does nothing special anymore.void
clearInterval(int intervalID)
Cancels the interval previously started using thesetInterval(Context, Scriptable, Scriptable, Object[], Function)
method.void
clearTimeout(int timeoutId)
Cancels a time-out previously set with thesetTimeout(Context, Scriptable, Scriptable, Object[], Function)
method.void
close()
void
close_js()
Closes this window.boolean
confirm(java.lang.String message)
The JavaScript functionconfirm
.boolean
dispatchEvent(Event event)
Dispatches an event into the event system (standards-conformant browsers only).void
dump(java.lang.String message)
Logs messages to the browser's standard output (stdout).boolean
find(java.lang.String search, boolean caseSensitive, boolean backwards, boolean wrapAround, boolean wholeWord, boolean searchInFrames, boolean showDialog)
Stub only at the moment.void
focus()
Sets the focus to this element.java.lang.Object
get(int index, org.htmlunit.corejs.javascript.Scriptable start)
BrowserVersion
getBrowserVersion()
Gets the browser version currently used.java.lang.Object
getClientInformation()
Returns the JavaScript propertyclientInformation
.ComputedCSSStyleDeclaration
getComputedStyle(java.lang.Object element, java.lang.String pseudoElement)
Returns computed style of the element.java.lang.Object
getControllers()
Gets thecontrollers
.Crypto
getCrypto()
Returns thecrypto
property.Event
getCurrentEvent()
Returns the current event (used internally regardless of the emulation mode).int
getDevicePixelRatio()
Returns thedevicePixelRatio
property.Document
getDocument()
Returns the window's current document.DocumentProxy
getDocument_js()
Returns the JavaScript propertydocument
.private java.lang.Object
getElementsByName(HtmlPage page, java.lang.String name)
java.lang.Object
getEvent()
Returns the current event.External
getExternal()
Returns theexternal
property.HtmlUnitScriptable
getFrameElement()
Returns the (i)frame in which the window is contained.private HTMLCollection
getFrames()
Returns the live collection of frames contained by this window.Window
getFrames_js()
Returns the value of theframes
property.private static java.lang.Object
getFrameWindowByName(HtmlPage page, java.lang.String name)
History
getHistory()
Returns thehistory
property.int
getInnerHeight()
Returns theinnerHeight
.int
getInnerWidth()
Returns theinnerWidth
.java.lang.Object
getIsSecureContext()
int
getLength()
Returns the number of frames contained by this window.Storage
getLocalStorage()
Returns thelocalStorage
property.Location
getLocation()
Returns thelocation
property.int
getMozInnerScreenX()
Returns the value ofmozInnerScreenX
property.int
getMozInnerScreenY()
Returns the value ofmozInnerScreenY
property.java.lang.String
getName()
Returns the value of the window'sname
property.Navigator
getNavigator()
Returns the JavaScript propertynavigator
.Netscape
getNetscape()
Returns the value ofnetscape
property.java.lang.Object
getOffscreenBuffering()
Returns theoffscreenBuffering
property.org.htmlunit.corejs.javascript.Function
getOnabort()
Returns theonabort
event handler.org.htmlunit.corejs.javascript.Function
getOnafterprint()
Returns theonafterprint
event handler.org.htmlunit.corejs.javascript.Function
getOnanimationend()
Returns theonanimationend
event handler.org.htmlunit.corejs.javascript.Function
getOnanimationiteration()
Returns theonanimationiteration
event handler.org.htmlunit.corejs.javascript.Function
getOnanimationstart()
Returns theonanimationstart
event handler.org.htmlunit.corejs.javascript.Function
getOnauxclick()
Returns theonauxclick
event handler.org.htmlunit.corejs.javascript.Function
getOnbeforeprint()
Returns theonbeforeprint
event handler.java.lang.Object
getOnbeforeunload()
Returns the value of the window'sonbeforeunload
property.java.lang.Object
getOnblur()
Returns theonblur
property (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.Function
getOncancel()
Returns theoncancel
event handler.org.htmlunit.corejs.javascript.Function
getOncanplay()
Returns theoncanplay
event handler.org.htmlunit.corejs.javascript.Function
getOncanplaythrough()
Returns theoncanplaythrough
event handler.java.lang.Object
getOnchange()
Getter for theonchange
event handler.java.lang.Object
getOnclick()
Returns theonclick
property (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.Function
getOnclose()
Returns theonclose
event handler.org.htmlunit.corejs.javascript.Function
getOncontextmenu()
Returns theoncontextmenu
event handler.org.htmlunit.corejs.javascript.Function
getOncuechange()
Returns theoncuechange
event handler.java.lang.Object
getOndblclick()
Returns theondblclick
property (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.Function
getOndevicemotion()
Returns theondevicemotion
event handler.org.htmlunit.corejs.javascript.Function
getOndeviceorientation()
Returns theondeviceorientation
event handler.org.htmlunit.corejs.javascript.Function
getOndeviceorientationabsolute()
Returns theondeviceorientationabsolute
event handler.org.htmlunit.corejs.javascript.Function
getOndrag()
Returns theondrag
event handler.org.htmlunit.corejs.javascript.Function
getOndragend()
Returns theondragend
event handler.org.htmlunit.corejs.javascript.Function
getOndragenter()
Returns theondragenter
event handler.org.htmlunit.corejs.javascript.Function
getOndragleave()
Returns theondragleave
event handler.org.htmlunit.corejs.javascript.Function
getOndragover()
Returns theondragover
event handler.org.htmlunit.corejs.javascript.Function
getOndragstart()
Returns theondragstart
event handler.org.htmlunit.corejs.javascript.Function
getOndrop()
Returns theondrop
event handler.org.htmlunit.corejs.javascript.Function
getOndurationchange()
Returns theondurationchange
event handler.org.htmlunit.corejs.javascript.Function
getOnemptied()
Returns theonemptied
event handler.org.htmlunit.corejs.javascript.Function
getOnended()
Returns theonended
event handler.java.lang.Object
getOnerror()
Returns the value of the window'sonerror
property.org.htmlunit.corejs.javascript.Function
getOnfocus()
Returns theonfocus
event handler.org.htmlunit.corejs.javascript.Function
getOngotpointercapture()
Returns theongotpointercapture
event handler.java.lang.Object
getOnhashchange()
Returns theonhashchange
property (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.Function
getOninput()
Returns theoninput
event handler.org.htmlunit.corejs.javascript.Function
getOninvalid()
Returns theoninvalid
event handler.org.htmlunit.corejs.javascript.Function
getOnkeydown()
Returns theonkeydown
event handler.org.htmlunit.corejs.javascript.Function
getOnkeypress()
Returns theonkeypress
event handler.org.htmlunit.corejs.javascript.Function
getOnkeyup()
Returns theonkeyup
event handler.org.htmlunit.corejs.javascript.Function
getOnlanguagechange()
Returns theonlanguagechange
event handler.java.lang.Object
getOnload()
Returns theonload
property.org.htmlunit.corejs.javascript.Function
getOnloadeddata()
Returns theonloadeddata
event handler.org.htmlunit.corejs.javascript.Function
getOnloadedmetadata()
Returns theonloadedmetadata
event handler.org.htmlunit.corejs.javascript.Function
getOnloadstart()
Returns theonloadstart
event handler.org.htmlunit.corejs.javascript.Function
getOnlostpointercapture()
Returns theonlostpointercapture
event handler.java.lang.Object
getOnmessage()
Returns the value of the window'sonmessage
property.org.htmlunit.corejs.javascript.Function
getOnmousedown()
Returns theonmousedown
event handler.org.htmlunit.corejs.javascript.Function
getOnmouseenter()
Returns theonmouseenter
event handler.org.htmlunit.corejs.javascript.Function
getOnmouseleave()
Returns theonmouseleave
event handler.org.htmlunit.corejs.javascript.Function
getOnmousemove()
Returns theonmousemove
event handler.org.htmlunit.corejs.javascript.Function
getOnmouseout()
Returns theonmouseout
event handler.org.htmlunit.corejs.javascript.Function
getOnmouseover()
Returns theonmouseover
event handler.org.htmlunit.corejs.javascript.Function
getOnmouseup()
Returns theonmouseup
event handler.org.htmlunit.corejs.javascript.Function
getOnmousewheel()
Returns theonmousewheel
event handler.org.htmlunit.corejs.javascript.Function
getOnmozfullscreenchange()
Returns theonmozfullscreenchange
event handler.org.htmlunit.corejs.javascript.Function
getOnmozfullscreenerror()
Returns theonmozfullscreenerror
event handler.org.htmlunit.corejs.javascript.Function
getOnoffline()
Returns theonoffline
event handler.org.htmlunit.corejs.javascript.Function
getOnonline()
Returns theononline
event handler.org.htmlunit.corejs.javascript.Function
getOnpagehide()
Returns theonpagehide
event handler.org.htmlunit.corejs.javascript.Function
getOnpageshow()
Returns theonpageshow
event handler.org.htmlunit.corejs.javascript.Function
getOnpause()
Returns theonpause
event handler.org.htmlunit.corejs.javascript.Function
getOnplay()
Returns theonplay
event handler.org.htmlunit.corejs.javascript.Function
getOnplaying()
Returns theonplaying
event handler.org.htmlunit.corejs.javascript.Function
getOnpointercancel()
Returns theonpointercancel
event handler.org.htmlunit.corejs.javascript.Function
getOnpointerdown()
Returns theonpointerdown
event handler.org.htmlunit.corejs.javascript.Function
getOnpointerenter()
Returns theonpointerenter
event handler.org.htmlunit.corejs.javascript.Function
getOnpointerleave()
Returns theonpointerleave
event handler.org.htmlunit.corejs.javascript.Function
getOnpointermove()
Returns theonpointermove
event handler.org.htmlunit.corejs.javascript.Function
getOnpointerout()
Returns theonpointerout
event handler.org.htmlunit.corejs.javascript.Function
getOnpointerover()
Returns theonpointerover
event handler.org.htmlunit.corejs.javascript.Function
getOnpointerup()
Returns theonpointerup
event handler.org.htmlunit.corejs.javascript.Function
getOnpopstate()
Returns theonpopstate
event handler.org.htmlunit.corejs.javascript.Function
getOnprogress()
Returns theonprogress
event handler.org.htmlunit.corejs.javascript.Function
getOnratechange()
Returns theonratechange
event handler.org.htmlunit.corejs.javascript.Function
getOnrejectionhandled()
Returns theonrejectionhandled
event handler.org.htmlunit.corejs.javascript.Function
getOnreset()
Returns theonreset
event handler.org.htmlunit.corejs.javascript.Function
getOnresize()
Returns theonresize
event handler.org.htmlunit.corejs.javascript.Function
getOnscroll()
Returns theonscroll
event handler.org.htmlunit.corejs.javascript.Function
getOnsearch()
Returns theonsearch
event handler.org.htmlunit.corejs.javascript.Function
getOnseeked()
Returns theonseeked
event handler.org.htmlunit.corejs.javascript.Function
getOnseeking()
Returns theonseeking
event handler.org.htmlunit.corejs.javascript.Function
getOnselect()
Returns theonselect
event handler.org.htmlunit.corejs.javascript.Function
getOnstalled()
Returns theonstalled
event handler.org.htmlunit.corejs.javascript.Function
getOnstorage()
Returns theonstorage
event handler.java.lang.Object
getOnsubmit()
Getter for theonsubmit
event handler.org.htmlunit.corejs.javascript.Function
getOnsuspend()
Returns theonsuspend
event handler.org.htmlunit.corejs.javascript.Function
getOntimeupdate()
Returns theontimeupdate
event handler.org.htmlunit.corejs.javascript.Function
getOntoggle()
Returns theontoggle
event handler.org.htmlunit.corejs.javascript.Function
getOntransitionend()
Returns theontransitionend
event handler.org.htmlunit.corejs.javascript.Function
getOnunhandledrejection()
Returns theonunhandledrejection
event handler.org.htmlunit.corejs.javascript.Function
getOnunload()
Returns theonunload
event handler.org.htmlunit.corejs.javascript.Function
getOnvolumechange()
Returns theonvolumechange
event handler.org.htmlunit.corejs.javascript.Function
getOnwaiting()
Returns theonwaiting
event handler.org.htmlunit.corejs.javascript.Function
getOnwebkitanimationend()
Returns theonwebkitanimationend
event handler.org.htmlunit.corejs.javascript.Function
getOnwebkitanimationiteration()
Returns theonwebkitanimationiteration
event handler.org.htmlunit.corejs.javascript.Function
getOnwebkitanimationstart()
Returns theonwebkitanimationstart
event handler.org.htmlunit.corejs.javascript.Function
getOnwebkittransitionend()
Returns theonwebkittransitionend
event handler.org.htmlunit.corejs.javascript.Function
getOnwheel()
Returns theonwheel
event handler.java.lang.Object
getOpener()
Returns the value of theopener
property.int
getOuterHeight()
Returns theouterHeight
.int
getOuterWidth()
Returns theouterWidth
.int
getPageXOffset()
Returns the value ofpageXOffset
property.int
getPageYOffset()
Returns the value ofpageYOffset
property.org.htmlunit.corejs.javascript.ScriptableObject
getParent()
Returns the value of theparent
property.Performance
getPerformance()
Returns theperformance
property.static int
getPort(java.net.URL url)
Returns the port of the specified URL.org.htmlunit.corejs.javascript.Scriptable
getPrototype(java.lang.Class<? extends HtmlUnitScriptable> jsClass)
Returns the prototype object corresponding to the specified HtmlUnit class inside the window scope.static WindowProxy
getProxy(WebWindow w)
Returns the proxy for the specified window.Screen
getScreen()
Returns thescreen
property.int
getScrollX()
Returns the value ofscrollX
property.int
getScrollY()
Returns the value ofscrollY
property.Selection
getSelection()
Returns the current selection.Selection
getSelectionImpl()
Returns the current selection.Window
getSelf()
Returns theself
property.Storage
getSessionStorage()
Returns thesessionStorage
property.SpeechSynthesis
getSpeechSynthesis()
Returns thespeechSynthesis
property.java.lang.String
getStatus()
Returns the text from the status line.Storage
getStorage(StorageHolder.Type storageType)
Gets the storage of the specified type.StyleMedia
getStyleMedia()
Returns thestyleMedia
property.java.lang.Object
getTop()
Returns the value of thetop
property.WebWindow
getWebWindow()
Returns the WebWindow associated with this Window.Window
getWindow_js()
Returns the window property.java.lang.Object
getWithFallback(java.lang.String name)
To be called when the property detection fails in normal scenarios.void
initialize()
Initializes the object.void
initialize(Page enclosedPage)
Initialize the object.void
initialize(WebWindow webWindow, Page pageToEnclose)
Initializes this window.boolean
isClosed()
Indicates if this window is closed.boolean
isConst(java.lang.String name)
Used to allow re-declaration of constants (eg: "var undefined;").static org.htmlunit.corejs.javascript.Scriptable
jsConstructor(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function ctorObj, boolean inNewExpr)
Creates an instance.private java.net.URL
makeUrlForOpenWindow(java.lang.String urlString)
MediaQueryList
matchMedia(java.lang.String mediaQueryString)
Returns a new MediaQueryList object representing the parsed results of the specified media query string.void
moveBy(int x, int y)
Does nothing.void
moveTo(int x, int y)
Does nothing.WindowProxy
open(java.lang.Object url, java.lang.Object name, java.lang.Object features, java.lang.Object replace)
Opens a new window.static void
postMessage(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function funObj)
Posts a message.void
print()
Prints the current page.java.lang.String
prompt(java.lang.String message, java.lang.Object defaultValue)
The JavaScript functionprompt
.void
put(java.lang.String name, org.htmlunit.corejs.javascript.Scriptable start, java.lang.Object value)
private void
readObject(java.io.ObjectInputStream stream)
Restores the transient fields during deserialization.void
releaseEvents(java.lang.String type)
Does nothing special anymore.int
requestAnimationFrame(java.lang.Object callback)
Add callback to the list of animationFrames.void
resizeBy(int width, int height)
Does nothing.void
resizeTo(int width, int height)
Does nothing.void
scroll(int x, int y)
Scrolls to the specified location on the page.void
scrollBy(int x, int y)
Scrolls the window content the specified distance.void
scrollByLines(int lines)
Scrolls the window content down by the specified number of lines.void
scrollByPages(int pages)
Scrolls the window content down by the specified number of pages.void
scrollTo(int x, int y)
Scrolls to the specified location on the page.void
setClientInformation(java.lang.Object clientInformation)
void
setControllers(java.lang.Object value)
Sets thecontrollers
.void
setCurrentEvent(Event event)
Sets the current event.private void
setHandlerForJavaScript(java.lang.String eventName, java.lang.Object handler)
void
setInnerHeight(int height)
Sets theinnerHeight
.void
setInnerWidth(int width)
Sets theinnerWidth
.static java.lang.Object
setInterval(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function function)
Sets a chunk of JavaScript to be invoked each time a specified number of milliseconds has elapsed.void
setLocation(java.lang.String newLocation)
Sets thelocation
property.void
setName(java.lang.String name)
Sets the value of the window'sname
property.void
setOnabort(java.lang.Object onabort)
Sets theonabort
event handler.void
setOnafterprint(java.lang.Object onafterprint)
Sets theonafterprint
event handler.void
setOnanimationend(java.lang.Object onanimationend)
Sets theonanimationend
event handler.void
setOnanimationiteration(java.lang.Object onanimationiteration)
Sets theonanimationiteration
event handler.void
setOnanimationstart(java.lang.Object onanimationstart)
Sets theonanimationstart
event handler.void
setOnauxclick(java.lang.Object onauxclick)
Sets theonauxclick
event handler.void
setOnbeforeprint(java.lang.Object onbeforeprint)
Sets theonbeforeprint
event handler.void
setOnbeforeunload(java.lang.Object onbeforeunload)
Sets the value of the window'sonbeforeunload
property.void
setOnblur(java.lang.Object onblur)
Sets the value of theonblur
event handler.void
setOncancel(java.lang.Object oncancel)
Sets theoncancel
event handler.void
setOncanplay(java.lang.Object oncanplay)
Sets theoncanplay
event handler.void
setOncanplaythrough(java.lang.Object oncanplaythrough)
Sets theoncanplaythrough
event handler.void
setOnchange(java.lang.Object onchange)
Setter for theonchange
event handler.void
setOnclick(java.lang.Object onclick)
Sets the value of theonclick
event handler.void
setOnclose(java.lang.Object onclose)
Sets theonclose
event handler.void
setOncontextmenu(java.lang.Object oncontextmenu)
Sets theoncontextmenu
event handler.void
setOncuechange(java.lang.Object oncuechange)
Sets theoncuechange
event handler.void
setOndblclick(java.lang.Object ondblclick)
Sets the value of theondblclick
event handler.void
setOndevicemotion(java.lang.Object ondevicemotion)
Sets theondevicemotion
event handler.void
setOndeviceorientation(java.lang.Object ondeviceorientation)
Sets theondeviceorientation
event handler.void
setOndeviceorientationabsolute(java.lang.Object ondeviceorientationabsolute)
Sets theondeviceorientationabsolute
event handler.void
setOndrag(java.lang.Object ondrag)
Sets theondrag
event handler.void
setOndragend(java.lang.Object ondragend)
Sets theondragend
event handler.void
setOndragenter(java.lang.Object ondragenter)
Sets theondragenter
event handler.void
setOndragleave(java.lang.Object ondragleave)
Sets theondragleave
event handler.void
setOndragover(java.lang.Object ondragover)
Sets theondragover
event handler.void
setOndragstart(java.lang.Object ondragstart)
Sets theondragstart
event handler.void
setOndrop(java.lang.Object ondrop)
Sets theondrop
event handler.void
setOndurationchange(java.lang.Object ondurationchange)
Sets theondurationchange
event handler.void
setOnemptied(java.lang.Object onemptied)
Sets theonemptied
event handler.void
setOnended(java.lang.Object onended)
Sets theonended
event handler.void
setOnerror(java.lang.Object onerror)
Sets the value of the window'sonerror
property.void
setOnfocus(java.lang.Object onfocus)
Sets theonfocus
event handler.void
setOngotpointercapture(java.lang.Object ongotpointercapture)
Sets theongotpointercapture
event handler.void
setOnhashchange(java.lang.Object onhashchange)
Sets the value of theonhashchange
event handler.void
setOninput(java.lang.Object oninput)
Sets theoninput
event handler.void
setOninvalid(java.lang.Object oninvalid)
Sets theoninvalid
event handler.void
setOnkeydown(java.lang.Object onkeydown)
Sets theonkeydown
event handler.void
setOnkeypress(java.lang.Object onkeypress)
Sets theonkeypress
event handler.void
setOnkeyup(java.lang.Object onkeyup)
Sets theonkeyup
event handler.void
setOnlanguagechange(java.lang.Object onlanguagechange)
Sets theonlanguagechange
event handler.void
setOnload(java.lang.Object onload)
Sets the value of theonload
event handler.void
setOnloadeddata(java.lang.Object onloadeddata)
Sets theonloadeddata
event handler.void
setOnloadedmetadata(java.lang.Object onloadedmetadata)
Sets theonloadedmetadata
event handler.void
setOnloadstart(java.lang.Object onloadstart)
Sets theonloadstart
event handler.void
setOnlostpointercapture(java.lang.Object onlostpointercapture)
Sets theonlostpointercapture
event handler.void
setOnmessage(java.lang.Object onmessage)
Sets the value of the window'sonmessage
property.void
setOnmousedown(java.lang.Object onmousedown)
Sets theonmousedown
event handler.void
setOnmouseenter(java.lang.Object onmouseenter)
Sets theonmouseenter
event handler.void
setOnmouseleave(java.lang.Object onmouseleave)
Sets theonmouseleave
event handler.void
setOnmousemove(java.lang.Object onmousemove)
Sets theonmousemove
event handler.void
setOnmouseout(java.lang.Object onmouseout)
Sets theonmouseout
event handler.void
setOnmouseover(java.lang.Object onmouseover)
Sets theonmouseover
event handler.void
setOnmouseup(java.lang.Object onmouseup)
Sets theonmouseup
event handler.void
setOnmousewheel(java.lang.Object onmousewheel)
Sets theonmousewheel
event handler.void
setOnmozfullscreenchange(java.lang.Object onmozfullscreenchange)
Sets theonmozfullscreenchange
event handler.void
setOnmozfullscreenerror(java.lang.Object onmozfullscreenerror)
Sets theonmozfullscreenerror
event handler.void
setOnoffline(java.lang.Object onoffline)
Sets theonoffline
event handler.void
setOnonline(java.lang.Object ononline)
Sets theononline
event handler.void
setOnpagehide(java.lang.Object onpagehide)
Sets theonpagehide
event handler.void
setOnpageshow(java.lang.Object onpageshow)
Sets theonpageshow
event handler.void
setOnpause(java.lang.Object onpause)
Sets theonpause
event handler.void
setOnplay(java.lang.Object onplay)
Sets theonplay
event handler.void
setOnplaying(java.lang.Object onplaying)
Sets theonplaying
event handler.void
setOnpointercancel(java.lang.Object onpointercancel)
Sets theonpointercancel
event handler.void
setOnpointerdown(java.lang.Object onpointerdown)
Sets theonpointerdown
event handler.void
setOnpointerenter(java.lang.Object onpointerenter)
Sets theonpointerenter
event handler.void
setOnpointerleave(java.lang.Object onpointerleave)
Sets theonpointerleave
event handler.void
setOnpointermove(java.lang.Object onpointermove)
Sets theonpointermove
event handler.void
setOnpointerout(java.lang.Object onpointerout)
Sets theonpointerout
event handler.void
setOnpointerover(java.lang.Object onpointerover)
Sets theonpointerover
event handler.void
setOnpointerup(java.lang.Object onpointerup)
Sets theonpointerup
event handler.void
setOnpopstate(java.lang.Object onpopstate)
Sets theonpopstate
event handler.void
setOnprogress(java.lang.Object onprogress)
Sets theonprogress
event handler.void
setOnratechange(java.lang.Object onratechange)
Sets theonratechange
event handler.void
setOnrejectionhandled(java.lang.Object onrejectionhandled)
Sets theonrejectionhandled
event handler.void
setOnreset(java.lang.Object onreset)
Sets theonreset
event handler.void
setOnresize(java.lang.Object onresize)
Sets theonresize
event handler.void
setOnscroll(java.lang.Object onscroll)
Sets theonscroll
event handler.void
setOnsearch(java.lang.Object onsearch)
Sets theonsearch
event handler.void
setOnseeked(java.lang.Object onseeked)
Sets theonseeked
event handler.void
setOnseeking(java.lang.Object onseeking)
Sets theonseeking
event handler.void
setOnselect(java.lang.Object onselect)
Sets theonselect
event handler.void
setOnstalled(java.lang.Object onstalled)
Sets theonstalled
event handler.void
setOnstorage(java.lang.Object onstorage)
Sets theonstorage
event handler.void
setOnsubmit(java.lang.Object onsubmit)
Setter for theonsubmit
event handler.void
setOnsuspend(java.lang.Object onsuspend)
Sets theonsuspend
event handler.void
setOntimeupdate(java.lang.Object ontimeupdate)
Sets theontimeupdate
event handler.void
setOntoggle(java.lang.Object ontoggle)
Sets theontoggle
event handler.void
setOntransitionend(java.lang.Object ontransitionend)
Sets theontransitionend
event handler.void
setOnunhandledrejection(java.lang.Object onunhandledrejection)
Sets theonunhandledrejection
event handler.void
setOnunload(java.lang.Object onunload)
Sets theonunload
event handler.void
setOnvolumechange(java.lang.Object onvolumechange)
Sets theonvolumechange
event handler.void
setOnwaiting(java.lang.Object onwaiting)
Sets theonwaiting
event handler.void
setOnwebkitanimationend(java.lang.Object onwebkitanimationend)
Sets theonwebkitanimationend
event handler.void
setOnwebkitanimationiteration(java.lang.Object onwebkitanimationiteration)
Sets theonwebkitanimationiteration
event handler.void
setOnwebkitanimationstart(java.lang.Object onwebkitanimationstart)
Sets theonwebkitanimationstart
event handler.void
setOnwebkittransitionend(java.lang.Object onwebkittransitionend)
Sets theonwebkittransitionend
event handler.void
setOnwheel(java.lang.Object onwheel)
Sets theonwheel
event handler.void
setOpener(java.lang.Object newValue)
Sets theopener
property.void
setOuterHeight(int height)
Sets theouterHeight
.void
setOuterWidth(int width)
Sets theouterWidth
.void
setParentScope(org.htmlunit.corejs.javascript.Scriptable parent)
Does nothing.void
setPrototypes(java.util.Map<java.lang.Class<? extends org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable> map)
Sets the prototypes for HtmlUnit host classes.void
setStatus(java.lang.String message)
Sets the text from the status line.static java.lang.Object
setTimeout(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function function)
Sets a chunk of JavaScript to be invoked at some specified time later.void
setTop(java.lang.Object o)
Sets the value of thetop
property.void
stop()
Should implement the stop() function on the window object.void
triggerOnError(ScriptException e)
Triggers theonerror
handler, if one has been set.-
Methods inherited from class org.htmlunit.javascript.host.event.EventTarget
addEventListener, clearEventListenersContainer, executeEventLocally, fireEvent, getEventHandler, getEventListenersContainer, hasEventHandlers, isEventHandlerOnWindow, jsConstructor, removeEventListener, setEventHandler
-
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, setClassName, setDomNode, setDomNode, 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, 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, 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
-
TEMPORARY
public static final int TEMPORARY
To be documented.- See Also:
- Constant Field Values
-
PERSISTENT
public static final int PERSISTENT
To be documented.- See Also:
- Constant Field Values
-
document_
private Document document_
-
documentProxy_
private DocumentProxy documentProxy_
-
navigator_
private Navigator navigator_
-
clientInformation_
private java.lang.Object clientInformation_
-
webWindow_
private WebWindow webWindow_
-
windowProxy_
private WindowProxy windowProxy_
-
screen_
private Screen screen_
-
history_
private History history_
-
location_
private Location location_
-
selection_
private Selection selection_
-
currentEvent_
private Event currentEvent_
-
status_
private java.lang.String status_
-
prototypes_
private java.util.Map<java.lang.Class<? extends org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable> prototypes_
-
controllers_
private java.lang.Object controllers_
-
opener_
private java.lang.Object opener_
-
top_
private java.lang.Object top_
-
crypto_
private Crypto crypto_
-
storages_
private final java.util.EnumMap<StorageHolder.Type,Storage> storages_
-
animationFrames_
private transient java.util.List<Window.AnimationFrame> animationFrames_
-
-
Method Detail
-
jsConstructor
public static org.htmlunit.corejs.javascript.Scriptable jsConstructor(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function ctorObj, boolean inNewExpr)
Creates an instance.- Parameters:
cx
- the current contextscope
- the scopeargs
- the argumentsctorObj
- the function objectinNewExpr
- Is new or not- Returns:
- the java object to allow JavaScript to access
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundException
Restores the transient fields during deserialization.- Parameters:
stream
- the stream to read the object from- Throws:
java.io.IOException
- if an IO error occursjava.lang.ClassNotFoundException
- if a class is not found
-
getPrototype
public org.htmlunit.corejs.javascript.Scriptable getPrototype(java.lang.Class<? extends HtmlUnitScriptable> jsClass)
Returns the prototype object corresponding to the specified HtmlUnit class inside the window scope.- Overrides:
getPrototype
in classHtmlUnitScriptable
- Parameters:
jsClass
- the class whose prototype is to be returned- Returns:
- the prototype object corresponding to the specified class inside the specified scope
-
setPrototypes
public void setPrototypes(java.util.Map<java.lang.Class<? extends org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable> map)
Sets the prototypes for HtmlUnit host classes.- Parameters:
map
- a Map of (Class
,Scriptable
)
-
alert
public void alert(java.lang.Object message)
The JavaScript functionalert()
.- Parameters:
message
- the message
-
btoa
public java.lang.String btoa(java.lang.String stringToEncode)
Creates a base-64 encoded ASCII string from a string of binary data.- Specified by:
btoa
in interfaceWindowOrWorkerGlobalScope
- Parameters:
stringToEncode
- string to encode- Returns:
- the encoded string
-
atob
public java.lang.String atob(java.lang.String encodedData)
Decodes a string of data which has been encoded using base-64 encoding.- Specified by:
atob
in interfaceWindowOrWorkerGlobalScope
- Parameters:
encodedData
- the encoded string- Returns:
- the decoded value
-
confirm
public boolean confirm(java.lang.String message)
The JavaScript functionconfirm
.- Parameters:
message
- the message- Returns:
- true if ok was pressed, false if cancel was pressed
-
prompt
public java.lang.String prompt(java.lang.String message, java.lang.Object defaultValue)
The JavaScript functionprompt
.- Parameters:
message
- the messagedefaultValue
- the default value displayed in the text input field- Returns:
- the value typed in or
null
if the user pressedcancel
-
getDocument_js
public DocumentProxy getDocument_js()
Returns the JavaScript propertydocument
.- Returns:
- the document
-
getDocument
public Document getDocument()
Returns the window's current document.- Returns:
- the window's current document
-
getEvent
public java.lang.Object getEvent()
Returns the current event.- Returns:
- the current event, or
null
if no event is currently available
-
getCurrentEvent
public Event getCurrentEvent()
Returns the current event (used internally regardless of the emulation mode).- Returns:
- the current event, or
null
if no event is currently available
-
setCurrentEvent
public void setCurrentEvent(Event event)
Sets the current event.- Parameters:
event
- the current event
-
open
public WindowProxy open(java.lang.Object url, java.lang.Object name, java.lang.Object features, java.lang.Object replace)
Opens a new window.- Parameters:
url
- when a new document is opened, url is a String that specifies a MIME type for the document. When a new window is opened, url is a String that specifies the URL to render in the new windowname
- the namefeatures
- the featuresreplace
- whether to replace in the history list or no- Returns:
- the newly opened window, or
null
if popup windows have been disabled - See Also:
WebClientOptions.isPopupBlockerEnabled()
, MSDN documentation
-
makeUrlForOpenWindow
private java.net.URL makeUrlForOpenWindow(java.lang.String urlString)
-
setTimeout
public static java.lang.Object setTimeout(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function function)
Sets a chunk of JavaScript to be invoked at some specified time later. The invocation occurs only if the window is opened after the delay and does not contain an other page than the one that originated the setTimeout.- Parameters:
context
- the JavaScript contextscope
- the scopethisObj
- the scriptableargs
- the arguments passed into the methodfunction
- the function- Returns:
- the id of the created timer
- See Also:
- MDN web docs
-
setInterval
public static java.lang.Object setInterval(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function function)
Sets a chunk of JavaScript to be invoked each time a specified number of milliseconds has elapsed.- Parameters:
context
- the JavaScript contextscope
- the scopethisObj
- the scriptableargs
- the arguments passed into the methodfunction
- the function- Returns:
- the id of the created interval
- See Also:
- MDN web docs
-
clearTimeout
public void clearTimeout(int timeoutId)
Cancels a time-out previously set with thesetTimeout(Context, Scriptable, Scriptable, Object[], Function)
method.- Parameters:
timeoutId
- identifier for the timeout to clear as returned bysetTimeout(Context, Scriptable, Scriptable, Object[], Function)
-
clearInterval
public void clearInterval(int intervalID)
Cancels the interval previously started using thesetInterval(Context, Scriptable, Scriptable, Object[], Function)
method. Current implementation does nothing.- Parameters:
intervalID
- specifies the interval to cancel as returned by thesetInterval(Context, Scriptable, Scriptable, Object[], Function)
method- See Also:
- MSDN documentation
-
getNavigator
public Navigator getNavigator()
Returns the JavaScript propertynavigator
.- Returns:
- the navigator
-
getClientInformation
public java.lang.Object getClientInformation()
Returns the JavaScript propertyclientInformation
.- Returns:
- the client information
-
setClientInformation
public void setClientInformation(java.lang.Object clientInformation)
- Parameters:
clientInformation
- the new value
-
getWindow_js
public Window getWindow_js()
Returns the window property. This is a synonym forself
.- Returns:
- the window property (a reference to
this
)
-
getSelf
public Window getSelf()
Returns theself
property.- Returns:
- this
-
getLocalStorage
public Storage getLocalStorage()
Returns thelocalStorage
property.- Returns:
- the
localStorage
property
-
getSessionStorage
public Storage getSessionStorage()
Returns thesessionStorage
property.- Returns:
- the
sessionStorage
property
-
getStorage
public Storage getStorage(StorageHolder.Type storageType)
Gets the storage of the specified type.- Parameters:
storageType
- the type- Returns:
- the storage
-
getLocation
public Location getLocation()
Returns thelocation
property.- Returns:
- the
location
property
-
setLocation
public void setLocation(java.lang.String newLocation) throws java.io.IOException
Sets thelocation
property. This will cause a reload of the window.- Parameters:
newLocation
- the URL of the new content- Throws:
java.io.IOException
- when location loading fails
-
dump
public void dump(java.lang.String message)
Logs messages to the browser's standard output (stdout). If the browser was started from a terminal, output sent to dump() will appear in the terminal. Output from dump() is not sent to the browser's developer tools console. To log to the developer tools console, use console.log().HtmlUnit always uses the WebConsole.
- Parameters:
message
- the message to log
-
animateAnimationsFrames
public int animateAnimationsFrames()
Invokes all the animation callbacks registered for this window by callingrequestAnimationFrame(Object)
once.- Returns:
- the number of pending animation callbacks
-
requestAnimationFrame
public int requestAnimationFrame(java.lang.Object callback)
Add callback to the list of animationFrames.- Parameters:
callback
- the function to call when it's time to update the animation- Returns:
- an identification id
- See Also:
- MDN Doc
-
cancelAnimationFrame
public void cancelAnimationFrame(java.lang.Object requestId)
Remove the callback from the list of animationFrames.- Parameters:
requestId
- the ID value returned by the call to window.requestAnimationFrame()- See Also:
- MDN Doc
-
getScreen
public Screen getScreen()
Returns thescreen
property.- Returns:
- the
screen
property
-
getHistory
public History getHistory()
Returns thehistory
property.- Returns:
- the
history
property
-
getExternal
public External getExternal()
Returns theexternal
property.- Returns:
- the
external
property
-
initialize
public void initialize(WebWindow webWindow, Page pageToEnclose)
Initializes this window.- Parameters:
webWindow
- the web window corresponding to this windowpageToEnclose
- the page that will become the enclosing page
-
initialize
public void initialize(Page enclosedPage)
Initialize the object.- Parameters:
enclosedPage
- the page containing the JavaScript
-
initialize
public void initialize()
Initializes the object. Only called for Windows with no contents.
-
getTop
public java.lang.Object getTop()
Returns the value of thetop
property.- Returns:
- the value of
top
-
setTop
public void setTop(java.lang.Object o)
Sets the value of thetop
property.- Parameters:
o
- the new value
-
getParent
public org.htmlunit.corejs.javascript.ScriptableObject getParent()
Returns the value of theparent
property.- Returns:
- the value of the
parent
property
-
getOpener
public java.lang.Object getOpener()
Returns the value of theopener
property.- Returns:
- the value of the
opener
, ornull
for a top level window
-
setOpener
public void setOpener(java.lang.Object newValue)
Sets theopener
property.- Parameters:
newValue
- the new value
-
getFrameElement
public HtmlUnitScriptable getFrameElement()
Returns the (i)frame in which the window is contained.- Returns:
null
for a top level window
-
getFrames_js
public Window getFrames_js()
Returns the value of theframes
property.- Returns:
- the value of the
frames
property
-
getLength
public int getLength()
Returns the number of frames contained by this window.- Returns:
- the number of frames contained by this window
-
getFrames
private HTMLCollection getFrames()
Returns the live collection of frames contained by this window.- Returns:
- the live collection of frames contained by this window
-
getWebWindow
public WebWindow getWebWindow()
Returns the WebWindow associated with this Window.- Returns:
- the WebWindow
-
focus
public void focus()
Sets the focus to this element.
-
blur
public void blur()
Removes focus from this element.
-
close_js
public void close_js()
Closes this window.
-
isClosed
public boolean isClosed()
Indicates if this window is closed.- Returns:
true
if this window is closed
-
moveTo
public void moveTo(int x, int y)
Does nothing.- Parameters:
x
- the horizontal positiony
- the vertical position
-
moveBy
public void moveBy(int x, int y)
Does nothing.- Parameters:
x
- the horizontal positiony
- the vertical position
-
resizeBy
public void resizeBy(int width, int height)
Does nothing.- Parameters:
width
- the width offsetheight
- the height offset
-
resizeTo
public void resizeTo(int width, int height)
Does nothing.- Parameters:
width
- the width of the Window in pixel after resizeheight
- the height of the Window in pixel after resize
-
scroll
public void scroll(int x, int y)
Scrolls to the specified location on the page.- Parameters:
x
- the horizontal position to scroll toy
- the vertical position to scroll to
-
scrollBy
public void scrollBy(int x, int y)
Scrolls the window content the specified distance.- Parameters:
x
- the horizontal distance to scroll byy
- the vertical distance to scroll by
-
scrollByLines
public void scrollByLines(int lines)
Scrolls the window content down by the specified number of lines.- Parameters:
lines
- the number of lines to scroll down
-
scrollByPages
public void scrollByPages(int pages)
Scrolls the window content down by the specified number of pages.- Parameters:
pages
- the number of pages to scroll down
-
scrollTo
public void scrollTo(int x, int y)
Scrolls to the specified location on the page.- Parameters:
x
- the horizontal position to scroll toy
- the vertical position to scroll to
-
getOnload
public java.lang.Object getOnload()
Returns theonload
property. Note that this is not necessarily a function if something else has been set.- Returns:
- the
onload
property
-
setOnload
public void setOnload(java.lang.Object onload)
Sets the value of theonload
event handler.- Parameters:
onload
- the new handler
-
setOnblur
public void setOnblur(java.lang.Object onblur)
Sets the value of theonblur
event handler.- Parameters:
onblur
- the new handler
-
getOnblur
public java.lang.Object getOnblur()
Returns theonblur
property (not necessary a function if something else has been set).- Returns:
- the
onblur
property
-
getOnclick
public java.lang.Object getOnclick()
Returns theonclick
property (not necessary a function if something else has been set).- Returns:
- the
onclick
property
-
setOnclick
public void setOnclick(java.lang.Object onclick)
Sets the value of theonclick
event handler.- Parameters:
onclick
- the new handler
-
getOndblclick
public java.lang.Object getOndblclick()
Returns theondblclick
property (not necessary a function if something else has been set).- Returns:
- the
ondblclick
property
-
setOndblclick
public void setOndblclick(java.lang.Object ondblclick)
Sets the value of theondblclick
event handler.- Parameters:
ondblclick
- the new handler
-
getOnhashchange
public java.lang.Object getOnhashchange()
Returns theonhashchange
property (not necessary a function if something else has been set).- Returns:
- the
onhashchange
property
-
setOnhashchange
public void setOnhashchange(java.lang.Object onhashchange)
Sets the value of theonhashchange
event handler.- Parameters:
onhashchange
- the new handler
-
getName
public java.lang.String getName()
Returns the value of the window'sname
property.- Returns:
- the value of the window's
name
property
-
setName
public void setName(java.lang.String name)
Sets the value of the window'sname
property.- Parameters:
name
- the value of the window'sname
property
-
getOnbeforeunload
public java.lang.Object getOnbeforeunload()
Returns the value of the window'sonbeforeunload
property.- Returns:
- the value of the window's
onbeforeunload
property
-
setOnbeforeunload
public void setOnbeforeunload(java.lang.Object onbeforeunload)
Sets the value of the window'sonbeforeunload
property.- Parameters:
onbeforeunload
- the value of the window'sonbeforeunload
property
-
getOnerror
public java.lang.Object getOnerror()
Returns the value of the window'sonerror
property.- Returns:
- the value of the window's
onerror
property
-
setOnerror
public void setOnerror(java.lang.Object onerror)
Sets the value of the window'sonerror
property.- Parameters:
onerror
- the value of the window'sonerror
property
-
getOnmessage
public java.lang.Object getOnmessage()
Returns the value of the window'sonmessage
property.- Returns:
- the value of the window's
onmessage
property
-
setOnmessage
public void setOnmessage(java.lang.Object onmessage)
Sets the value of the window'sonmessage
property.- Parameters:
onmessage
- the value of the window'sonmessage
property
-
triggerOnError
public void triggerOnError(ScriptException e)
Triggers theonerror
handler, if one has been set.- Parameters:
e
- the error that needs to be reported
-
setHandlerForJavaScript
private void setHandlerForJavaScript(java.lang.String eventName, java.lang.Object handler)
-
getWithFallback
public java.lang.Object getWithFallback(java.lang.String name)
To be called when the property detection fails in normal scenarios.- Parameters:
name
- the name- Returns:
- the found object, or
Scriptable.NOT_FOUND
-
get
public java.lang.Object get(int index, org.htmlunit.corejs.javascript.Scriptable start)
- Specified by:
get
in interfaceorg.htmlunit.corejs.javascript.Scriptable
- Overrides:
get
in classorg.htmlunit.corejs.javascript.ScriptableObject
-
getFrameWindowByName
private static java.lang.Object getFrameWindowByName(HtmlPage page, java.lang.String name)
-
getElementsByName
private java.lang.Object getElementsByName(HtmlPage page, java.lang.String name)
-
getProxy
public static WindowProxy getProxy(WebWindow w)
Returns the proxy for the specified window.- Parameters:
w
- the window whose proxy is to be returned- Returns:
- the proxy for the specified window
-
getStatus
public java.lang.String getStatus()
Returns the text from the status line.- Returns:
- the status line text
-
setStatus
public void setStatus(java.lang.String message)
Sets the text from the status line.- Parameters:
message
- the status line text
-
getInnerWidth
public int getInnerWidth()
Returns theinnerWidth
.- Returns:
- the
innerWidth
- See Also:
- Mozilla doc
-
setInnerWidth
public void setInnerWidth(int width)
Sets theinnerWidth
.- Parameters:
width
- theinnerWidth
-
getOuterWidth
public int getOuterWidth()
Returns theouterWidth
.- Returns:
- the
outerWidth
- See Also:
- Mozilla doc
-
setOuterWidth
public void setOuterWidth(int width)
Sets theouterWidth
.- Parameters:
width
- theouterWidth
-
getInnerHeight
public int getInnerHeight()
Returns theinnerHeight
.- Returns:
- the
innerHeight
- See Also:
- Mozilla doc
-
setInnerHeight
public void setInnerHeight(int height)
Sets theinnerHeight
.- Parameters:
height
- theinnerHeight
-
getOuterHeight
public int getOuterHeight()
Returns theouterHeight
.- Returns:
- the
outerHeight
- See Also:
- Mozilla doc
-
setOuterHeight
public void setOuterHeight(int height)
Sets theouterHeight
.- Parameters:
height
- theouterHeight
-
print
public void print()
Prints the current page. The current implementation uses thePrintHandler
defined for theWebClient
to process the window.- See Also:
- Mozilla documentation, MSDN documentation
-
captureEvents
public void captureEvents(java.lang.String type)
Does nothing special anymore.- Parameters:
type
- the type of events to capture- See Also:
Document.captureEvents(String)
-
releaseEvents
public void releaseEvents(java.lang.String type)
Does nothing special anymore.- Parameters:
type
- the type of events to capture- See Also:
Document.releaseEvents(String)
-
getComputedStyle
public ComputedCSSStyleDeclaration getComputedStyle(java.lang.Object element, java.lang.String pseudoElement)
Returns computed style of the element. Computed style represents the final computed values of all CSS properties for the element. This method's return value is of the same type as that ofelement.style
, but the value returned by this method is read-only.- Parameters:
element
- the elementpseudoElement
- a string specifying the pseudo-element to match (may benull
); e.g. ':before'- Returns:
- the computed style
-
getSelection
public Selection getSelection()
Returns the current selection.- Returns:
- the current selection
-
getSelectionImpl
public Selection getSelectionImpl()
Returns the current selection.- Returns:
- the current selection
-
getControllers
public java.lang.Object getControllers()
Gets thecontrollers
. The result doesn't currently matter but it is important to return an object as some JavaScript libraries check it.- Returns:
- some object
- See Also:
- Mozilla documentation
-
setControllers
public void setControllers(java.lang.Object value)
Sets thecontrollers
.- Parameters:
value
- the new value
-
getMozInnerScreenX
public int getMozInnerScreenX()
Returns the value ofmozInnerScreenX
property.- Returns:
- the value of
mozInnerScreenX
property
-
getMozInnerScreenY
public int getMozInnerScreenY()
Returns the value ofmozInnerScreenY
property.- Returns:
- the value of
mozInnerScreenY
property
-
stop
public void stop()
Should implement the stop() function on the window object. (currently empty implementation)- See Also:
- window.stop
-
getPageXOffset
public int getPageXOffset()
Returns the value ofpageXOffset
property.- Returns:
- the value of
pageXOffset
property
-
getPageYOffset
public int getPageYOffset()
Returns the value ofpageYOffset
property.- Returns:
- the value of
pageYOffset
property
-
getScrollX
public int getScrollX()
Returns the value ofscrollX
property.- Returns:
- the value of
scrollX
property
-
getScrollY
public int getScrollY()
Returns the value ofscrollY
property.- Returns:
- the value of
scrollY
property
-
getNetscape
public Netscape getNetscape()
Returns the value ofnetscape
property.- Returns:
- the value of
netscape
property
-
isConst
public boolean isConst(java.lang.String name)
Used to allow re-declaration of constants (eg: "var undefined;").- Specified by:
isConst
in interfaceorg.htmlunit.corejs.javascript.ConstProperties
- Overrides:
isConst
in classorg.htmlunit.corejs.javascript.ScriptableObject
-
dispatchEvent
public boolean dispatchEvent(Event event)
Dispatches an event into the event system (standards-conformant browsers only). See the Gecko DOM reference for more information.- Overrides:
dispatchEvent
in classEventTarget
- Parameters:
event
- the event to be dispatched- Returns:
false
if at least one of the event handlers which handled the event calledpreventDefault
;true
otherwise
-
getOnchange
public java.lang.Object getOnchange()
Getter for theonchange
event handler.- Returns:
- the handler
-
setOnchange
public void setOnchange(java.lang.Object onchange)
Setter for theonchange
event handler.- Parameters:
onchange
- the handler
-
getOnsubmit
public java.lang.Object getOnsubmit()
Getter for theonsubmit
event handler.- Returns:
- the handler
-
setOnsubmit
public void setOnsubmit(java.lang.Object onsubmit)
Setter for theonsubmit
event handler.- Parameters:
onsubmit
- the handler
-
postMessage
public static void postMessage(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function funObj)
Posts a message.- Parameters:
context
- the current contextscope
- the scopethisObj
- this objectargs
- the script(s) to importfunObj
- the JS function called- See Also:
- MDN documentation
-
getPort
public static int getPort(java.net.URL url)
Returns the port of the specified URL.- Parameters:
url
- the URL- Returns:
- the port
-
getPerformance
public Performance getPerformance()
Returns theperformance
property.- Returns:
- the
performance
property
-
getDevicePixelRatio
public int getDevicePixelRatio()
Returns thedevicePixelRatio
property.- Returns:
- the
devicePixelRatio
property
-
getStyleMedia
public StyleMedia getStyleMedia()
Returns thestyleMedia
property.- Returns:
- the
styleMedia
property
-
matchMedia
public MediaQueryList matchMedia(java.lang.String mediaQueryString)
Returns a new MediaQueryList object representing the parsed results of the specified media query string.- Parameters:
mediaQueryString
- the media query- Returns:
- a new MediaQueryList object
-
find
public boolean find(java.lang.String search, boolean caseSensitive, boolean backwards, boolean wrapAround, boolean wholeWord, boolean searchInFrames, boolean showDialog)
Stub only at the moment.- Parameters:
search
- the text string for which to searchcaseSensitive
- if true, specifies a case-sensitive searchbackwards
- if true, specifies a backward searchwrapAround
- if true, specifies a wrap around searchwholeWord
- if true, specifies a whole word searchsearchInFrames
- if true, specifies a search in framesshowDialog
- if true, specifies a show Dialog.- Returns:
- false
-
getSpeechSynthesis
public SpeechSynthesis getSpeechSynthesis()
Returns thespeechSynthesis
property.- Returns:
- the
speechSynthesis
property
-
getOffscreenBuffering
public java.lang.Object getOffscreenBuffering()
Returns theoffscreenBuffering
property.- Returns:
- the
offscreenBuffering
property
-
getCrypto
public Crypto getCrypto()
Returns thecrypto
property.- Returns:
- the
crypto
property
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
-
setParentScope
public void setParentScope(org.htmlunit.corejs.javascript.Scriptable parent)
Does nothing.- Specified by:
setParentScope
in interfaceorg.htmlunit.corejs.javascript.Scriptable
- Overrides:
setParentScope
in classHtmlUnitScriptable
- Parameters:
parent
- the new parent scope
-
getOnfocus
public org.htmlunit.corejs.javascript.Function getOnfocus()
Returns theonfocus
event handler.- Returns:
- the
onfocus
event handler
-
setOnfocus
public void setOnfocus(java.lang.Object onfocus)
Sets theonfocus
event handler.- Parameters:
onfocus
- theonfocus
event handler
-
getOndragend
public org.htmlunit.corejs.javascript.Function getOndragend()
Returns theondragend
event handler.- Returns:
- the
ondragend
event handler
-
setOndragend
public void setOndragend(java.lang.Object ondragend)
Sets theondragend
event handler.- Parameters:
ondragend
- theondragend
event handler
-
getOninvalid
public org.htmlunit.corejs.javascript.Function getOninvalid()
Returns theoninvalid
event handler.- Returns:
- the
oninvalid
event handler
-
setOninvalid
public void setOninvalid(java.lang.Object oninvalid)
Sets theoninvalid
event handler.- Parameters:
oninvalid
- theoninvalid
event handler
-
getOnpointerout
public org.htmlunit.corejs.javascript.Function getOnpointerout()
Returns theonpointerout
event handler.- Returns:
- the
onpointerout
event handler
-
setOnpointerout
public void setOnpointerout(java.lang.Object onpointerout)
Sets theonpointerout
event handler.- Parameters:
onpointerout
- theonpointerout
event handler
-
getOnratechange
public org.htmlunit.corejs.javascript.Function getOnratechange()
Returns theonratechange
event handler.- Returns:
- the
onratechange
event handler
-
setOnratechange
public void setOnratechange(java.lang.Object onratechange)
Sets theonratechange
event handler.- Parameters:
onratechange
- theonratechange
event handler
-
getOnanimationiteration
public org.htmlunit.corejs.javascript.Function getOnanimationiteration()
Returns theonanimationiteration
event handler.- Returns:
- the
onanimationiteration
event handler
-
setOnanimationiteration
public void setOnanimationiteration(java.lang.Object onanimationiteration)
Sets theonanimationiteration
event handler.- Parameters:
onanimationiteration
- theonanimationiteration
event handler
-
getOncanplaythrough
public org.htmlunit.corejs.javascript.Function getOncanplaythrough()
Returns theoncanplaythrough
event handler.- Returns:
- the
oncanplaythrough
event handler
-
setOncanplaythrough
public void setOncanplaythrough(java.lang.Object oncanplaythrough)
Sets theoncanplaythrough
event handler.- Parameters:
oncanplaythrough
- theoncanplaythrough
event handler
-
getOncancel
public org.htmlunit.corejs.javascript.Function getOncancel()
Returns theoncancel
event handler.- Returns:
- the
oncancel
event handler
-
setOncancel
public void setOncancel(java.lang.Object oncancel)
Sets theoncancel
event handler.- Parameters:
oncancel
- theoncancel
event handler
-
getOnpointerenter
public org.htmlunit.corejs.javascript.Function getOnpointerenter()
Returns theonpointerenter
event handler.- Returns:
- the
onpointerenter
event handler
-
setOnpointerenter
public void setOnpointerenter(java.lang.Object onpointerenter)
Sets theonpointerenter
event handler.- Parameters:
onpointerenter
- theonpointerenter
event handler
-
getOnselect
public org.htmlunit.corejs.javascript.Function getOnselect()
Returns theonselect
event handler.- Returns:
- the
onselect
event handler
-
setOnselect
public void setOnselect(java.lang.Object onselect)
Sets theonselect
event handler.- Parameters:
onselect
- theonselect
event handler
-
getOnauxclick
public org.htmlunit.corejs.javascript.Function getOnauxclick()
Returns theonauxclick
event handler.- Returns:
- the
onauxclick
event handler
-
setOnauxclick
public void setOnauxclick(java.lang.Object onauxclick)
Sets theonauxclick
event handler.- Parameters:
onauxclick
- theonauxclick
event handler
-
getOnscroll
public org.htmlunit.corejs.javascript.Function getOnscroll()
Returns theonscroll
event handler.- Returns:
- the
onscroll
event handler
-
setOnscroll
public void setOnscroll(java.lang.Object onscroll)
Sets theonscroll
event handler.- Parameters:
onscroll
- theonscroll
event handler
-
getOnkeydown
public org.htmlunit.corejs.javascript.Function getOnkeydown()
Returns theonkeydown
event handler.- Returns:
- the
onkeydown
event handler
-
setOnkeydown
public void setOnkeydown(java.lang.Object onkeydown)
Sets theonkeydown
event handler.- Parameters:
onkeydown
- theonkeydown
event handler
-
getOnwebkitanimationstart
public org.htmlunit.corejs.javascript.Function getOnwebkitanimationstart()
Returns theonwebkitanimationstart
event handler.- Returns:
- the
onwebkitanimationstart
event handler
-
setOnwebkitanimationstart
public void setOnwebkitanimationstart(java.lang.Object onwebkitanimationstart)
Sets theonwebkitanimationstart
event handler.- Parameters:
onwebkitanimationstart
- theonwebkitanimationstart
event handler
-
getOnkeyup
public org.htmlunit.corejs.javascript.Function getOnkeyup()
Returns theonkeyup
event handler.- Returns:
- the
onkeyup
event handler
-
setOnkeyup
public void setOnkeyup(java.lang.Object onkeyup)
Sets theonkeyup
event handler.- Parameters:
onkeyup
- theonkeyup
event handler
-
getOnreset
public org.htmlunit.corejs.javascript.Function getOnreset()
Returns theonreset
event handler.- Returns:
- the
onreset
event handler
-
setOnreset
public void setOnreset(java.lang.Object onreset)
Sets theonreset
event handler.- Parameters:
onreset
- theonreset
event handler
-
getOnkeypress
public org.htmlunit.corejs.javascript.Function getOnkeypress()
Returns theonkeypress
event handler.- Returns:
- the
onkeypress
event handler
-
setOnkeypress
public void setOnkeypress(java.lang.Object onkeypress)
Sets theonkeypress
event handler.- Parameters:
onkeypress
- theonkeypress
event handler
-
getOndrag
public org.htmlunit.corejs.javascript.Function getOndrag()
Returns theondrag
event handler.- Returns:
- the
ondrag
event handler
-
setOndrag
public void setOndrag(java.lang.Object ondrag)
Sets theondrag
event handler.- Parameters:
ondrag
- theondrag
event handler
-
getOnseeked
public org.htmlunit.corejs.javascript.Function getOnseeked()
Returns theonseeked
event handler.- Returns:
- the
onseeked
event handler
-
setOnseeked
public void setOnseeked(java.lang.Object onseeked)
Sets theonseeked
event handler.- Parameters:
onseeked
- theonseeked
event handler
-
getOnoffline
public org.htmlunit.corejs.javascript.Function getOnoffline()
Returns theonoffline
event handler.- Returns:
- the
onoffline
event handler
-
setOnoffline
public void setOnoffline(java.lang.Object onoffline)
Sets theonoffline
event handler.- Parameters:
onoffline
- theonoffline
event handler
-
getOndeviceorientation
public org.htmlunit.corejs.javascript.Function getOndeviceorientation()
Returns theondeviceorientation
event handler.- Returns:
- the
ondeviceorientation
event handler
-
setOndeviceorientation
public void setOndeviceorientation(java.lang.Object ondeviceorientation)
Sets theondeviceorientation
event handler.- Parameters:
ondeviceorientation
- theondeviceorientation
event handler
-
getOntoggle
public org.htmlunit.corejs.javascript.Function getOntoggle()
Returns theontoggle
event handler.- Returns:
- the
ontoggle
event handler
-
setOntoggle
public void setOntoggle(java.lang.Object ontoggle)
Sets theontoggle
event handler.- Parameters:
ontoggle
- theontoggle
event handler
-
getOnplay
public org.htmlunit.corejs.javascript.Function getOnplay()
Returns theonplay
event handler.- Returns:
- the
onplay
event handler
-
setOnplay
public void setOnplay(java.lang.Object onplay)
Sets theonplay
event handler.- Parameters:
onplay
- theonplay
event handler
-
getOncontextmenu
public org.htmlunit.corejs.javascript.Function getOncontextmenu()
Returns theoncontextmenu
event handler.- Returns:
- the
oncontextmenu
event handler
-
setOncontextmenu
public void setOncontextmenu(java.lang.Object oncontextmenu)
Sets theoncontextmenu
event handler.- Parameters:
oncontextmenu
- theoncontextmenu
event handler
-
getOnmousemove
public org.htmlunit.corejs.javascript.Function getOnmousemove()
Returns theonmousemove
event handler.- Returns:
- the
onmousemove
event handler
-
setOnmousemove
public void setOnmousemove(java.lang.Object onmousemove)
Sets theonmousemove
event handler.- Parameters:
onmousemove
- theonmousemove
event handler
-
getOnpointermove
public org.htmlunit.corejs.javascript.Function getOnpointermove()
Returns theonpointermove
event handler.- Returns:
- the
onpointermove
event handler
-
setOnpointermove
public void setOnpointermove(java.lang.Object onpointermove)
Sets theonpointermove
event handler.- Parameters:
onpointermove
- theonpointermove
event handler
-
getOnmouseover
public org.htmlunit.corejs.javascript.Function getOnmouseover()
Returns theonmouseover
event handler.- Returns:
- the
onmouseover
event handler
-
setOnmouseover
public void setOnmouseover(java.lang.Object onmouseover)
Sets theonmouseover
event handler.- Parameters:
onmouseover
- theonmouseover
event handler
-
getOnlostpointercapture
public org.htmlunit.corejs.javascript.Function getOnlostpointercapture()
Returns theonlostpointercapture
event handler.- Returns:
- the
onlostpointercapture
event handler
-
setOnlostpointercapture
public void setOnlostpointercapture(java.lang.Object onlostpointercapture)
Sets theonlostpointercapture
event handler.- Parameters:
onlostpointercapture
- theonlostpointercapture
event handler
-
getOnpointerover
public org.htmlunit.corejs.javascript.Function getOnpointerover()
Returns theonpointerover
event handler.- Returns:
- the
onpointerover
event handler
-
setOnpointerover
public void setOnpointerover(java.lang.Object onpointerover)
Sets theonpointerover
event handler.- Parameters:
onpointerover
- theonpointerover
event handler
-
getOnclose
public org.htmlunit.corejs.javascript.Function getOnclose()
Returns theonclose
event handler.- Returns:
- the
onclose
event handler
-
setOnclose
public void setOnclose(java.lang.Object onclose)
Sets theonclose
event handler.- Parameters:
onclose
- theonclose
event handler
-
getOnanimationend
public org.htmlunit.corejs.javascript.Function getOnanimationend()
Returns theonanimationend
event handler.- Returns:
- the
onanimationend
event handler
-
setOnanimationend
public void setOnanimationend(java.lang.Object onanimationend)
Sets theonanimationend
event handler.- Parameters:
onanimationend
- theonanimationend
event handler
-
getOndragenter
public org.htmlunit.corejs.javascript.Function getOndragenter()
Returns theondragenter
event handler.- Returns:
- the
ondragenter
event handler
-
setOndragenter
public void setOndragenter(java.lang.Object ondragenter)
Sets theondragenter
event handler.- Parameters:
ondragenter
- theondragenter
event handler
-
getOnafterprint
public org.htmlunit.corejs.javascript.Function getOnafterprint()
Returns theonafterprint
event handler.- Returns:
- the
onafterprint
event handler
-
setOnafterprint
public void setOnafterprint(java.lang.Object onafterprint)
Sets theonafterprint
event handler.- Parameters:
onafterprint
- theonafterprint
event handler
-
getOnmozfullscreenerror
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenerror()
Returns theonmozfullscreenerror
event handler.- Returns:
- the
onmozfullscreenerror
event handler
-
setOnmozfullscreenerror
public void setOnmozfullscreenerror(java.lang.Object onmozfullscreenerror)
Sets theonmozfullscreenerror
event handler.- Parameters:
onmozfullscreenerror
- theonmozfullscreenerror
event handler
-
getOnmouseleave
public org.htmlunit.corejs.javascript.Function getOnmouseleave()
Returns theonmouseleave
event handler.- Returns:
- the
onmouseleave
event handler
-
setOnmouseleave
public void setOnmouseleave(java.lang.Object onmouseleave)
Sets theonmouseleave
event handler.- Parameters:
onmouseleave
- theonmouseleave
event handler
-
getOnmousewheel
public org.htmlunit.corejs.javascript.Function getOnmousewheel()
Returns theonmousewheel
event handler.- Returns:
- the
onmousewheel
event handler
-
setOnmousewheel
public void setOnmousewheel(java.lang.Object onmousewheel)
Sets theonmousewheel
event handler.- Parameters:
onmousewheel
- theonmousewheel
event handler
-
getOnseeking
public org.htmlunit.corejs.javascript.Function getOnseeking()
Returns theonseeking
event handler.- Returns:
- the
onseeking
event handler
-
setOnseeking
public void setOnseeking(java.lang.Object onseeking)
Sets theonseeking
event handler.- Parameters:
onseeking
- theonseeking
event handler
-
getOncuechange
public org.htmlunit.corejs.javascript.Function getOncuechange()
Returns theoncuechange
event handler.- Returns:
- the
oncuechange
event handler
-
setOncuechange
public void setOncuechange(java.lang.Object oncuechange)
Sets theoncuechange
event handler.- Parameters:
oncuechange
- theoncuechange
event handler
-
getOnpageshow
public org.htmlunit.corejs.javascript.Function getOnpageshow()
Returns theonpageshow
event handler.- Returns:
- the
onpageshow
event handler
-
setOnpageshow
public void setOnpageshow(java.lang.Object onpageshow)
Sets theonpageshow
event handler.- Parameters:
onpageshow
- theonpageshow
event handler
-
getOnmozfullscreenchange
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenchange()
Returns theonmozfullscreenchange
event handler.- Returns:
- the
onmozfullscreenchange
event handler
-
setOnmozfullscreenchange
public void setOnmozfullscreenchange(java.lang.Object onmozfullscreenchange)
Sets theonmozfullscreenchange
event handler.- Parameters:
onmozfullscreenchange
- theonmozfullscreenchange
event handler
-
getOndurationchange
public org.htmlunit.corejs.javascript.Function getOndurationchange()
Returns theondurationchange
event handler.- Returns:
- the
ondurationchange
event handler
-
setOndurationchange
public void setOndurationchange(java.lang.Object ondurationchange)
Sets theondurationchange
event handler.- Parameters:
ondurationchange
- theondurationchange
event handler
-
getOnplaying
public org.htmlunit.corejs.javascript.Function getOnplaying()
Returns theonplaying
event handler.- Returns:
- the
onplaying
event handler
-
setOnplaying
public void setOnplaying(java.lang.Object onplaying)
Sets theonplaying
event handler.- Parameters:
onplaying
- theonplaying
event handler
-
getOnended
public org.htmlunit.corejs.javascript.Function getOnended()
Returns theonended
event handler.- Returns:
- the
onended
event handler
-
setOnended
public void setOnended(java.lang.Object onended)
Sets theonended
event handler.- Parameters:
onended
- theonended
event handler
-
getOnloadeddata
public org.htmlunit.corejs.javascript.Function getOnloadeddata()
Returns theonloadeddata
event handler.- Returns:
- the
onloadeddata
event handler
-
setOnloadeddata
public void setOnloadeddata(java.lang.Object onloadeddata)
Sets theonloadeddata
event handler.- Parameters:
onloadeddata
- theonloadeddata
event handler
-
getOnunhandledrejection
public org.htmlunit.corejs.javascript.Function getOnunhandledrejection()
Returns theonunhandledrejection
event handler.- Returns:
- the
onunhandledrejection
event handler
-
setOnunhandledrejection
public void setOnunhandledrejection(java.lang.Object onunhandledrejection)
Sets theonunhandledrejection
event handler.- Parameters:
onunhandledrejection
- theonunhandledrejection
event handler
-
getOnmouseout
public org.htmlunit.corejs.javascript.Function getOnmouseout()
Returns theonmouseout
event handler.- Returns:
- the
onmouseout
event handler
-
setOnmouseout
public void setOnmouseout(java.lang.Object onmouseout)
Sets theonmouseout
event handler.- Parameters:
onmouseout
- theonmouseout
event handler
-
getOnsuspend
public org.htmlunit.corejs.javascript.Function getOnsuspend()
Returns theonsuspend
event handler.- Returns:
- the
onsuspend
event handler
-
setOnsuspend
public void setOnsuspend(java.lang.Object onsuspend)
Sets theonsuspend
event handler.- Parameters:
onsuspend
- theonsuspend
event handler
-
getOnwaiting
public org.htmlunit.corejs.javascript.Function getOnwaiting()
Returns theonwaiting
event handler.- Returns:
- the
onwaiting
event handler
-
setOnwaiting
public void setOnwaiting(java.lang.Object onwaiting)
Sets theonwaiting
event handler.- Parameters:
onwaiting
- theonwaiting
event handler
-
getOncanplay
public org.htmlunit.corejs.javascript.Function getOncanplay()
Returns theoncanplay
event handler.- Returns:
- the
oncanplay
event handler
-
setOncanplay
public void setOncanplay(java.lang.Object oncanplay)
Sets theoncanplay
event handler.- Parameters:
oncanplay
- theoncanplay
event handler
-
getOnmousedown
public org.htmlunit.corejs.javascript.Function getOnmousedown()
Returns theonmousedown
event handler.- Returns:
- the
onmousedown
event handler
-
setOnmousedown
public void setOnmousedown(java.lang.Object onmousedown)
Sets theonmousedown
event handler.- Parameters:
onmousedown
- theonmousedown
event handler
-
getOnlanguagechange
public org.htmlunit.corejs.javascript.Function getOnlanguagechange()
Returns theonlanguagechange
event handler.- Returns:
- the
onlanguagechange
event handler
-
setOnlanguagechange
public void setOnlanguagechange(java.lang.Object onlanguagechange)
Sets theonlanguagechange
event handler.- Parameters:
onlanguagechange
- theonlanguagechange
event handler
-
getOnemptied
public org.htmlunit.corejs.javascript.Function getOnemptied()
Returns theonemptied
event handler.- Returns:
- the
onemptied
event handler
-
setOnemptied
public void setOnemptied(java.lang.Object onemptied)
Sets theonemptied
event handler.- Parameters:
onemptied
- theonemptied
event handler
-
getOnrejectionhandled
public org.htmlunit.corejs.javascript.Function getOnrejectionhandled()
Returns theonrejectionhandled
event handler.- Returns:
- the
onrejectionhandled
event handler
-
setOnrejectionhandled
public void setOnrejectionhandled(java.lang.Object onrejectionhandled)
Sets theonrejectionhandled
event handler.- Parameters:
onrejectionhandled
- theonrejectionhandled
event handler
-
getOnpointercancel
public org.htmlunit.corejs.javascript.Function getOnpointercancel()
Returns theonpointercancel
event handler.- Returns:
- the
onpointercancel
event handler
-
setOnpointercancel
public void setOnpointercancel(java.lang.Object onpointercancel)
Sets theonpointercancel
event handler.- Parameters:
onpointercancel
- theonpointercancel
event handler
-
getOnresize
public org.htmlunit.corejs.javascript.Function getOnresize()
Returns theonresize
event handler.- Returns:
- the
onresize
event handler
-
setOnresize
public void setOnresize(java.lang.Object onresize)
Sets theonresize
event handler.- Parameters:
onresize
- theonresize
event handler
-
getOnpause
public org.htmlunit.corejs.javascript.Function getOnpause()
Returns theonpause
event handler.- Returns:
- the
onpause
event handler
-
setOnpause
public void setOnpause(java.lang.Object onpause)
Sets theonpause
event handler.- Parameters:
onpause
- theonpause
event handler
-
getOnloadstart
public org.htmlunit.corejs.javascript.Function getOnloadstart()
Returns theonloadstart
event handler.- Returns:
- the
onloadstart
event handler
-
setOnloadstart
public void setOnloadstart(java.lang.Object onloadstart)
Sets theonloadstart
event handler.- Parameters:
onloadstart
- theonloadstart
event handler
-
getOnprogress
public org.htmlunit.corejs.javascript.Function getOnprogress()
Returns theonprogress
event handler.- Returns:
- the
onprogress
event handler
-
setOnprogress
public void setOnprogress(java.lang.Object onprogress)
Sets theonprogress
event handler.- Parameters:
onprogress
- theonprogress
event handler
-
getOnpointerup
public org.htmlunit.corejs.javascript.Function getOnpointerup()
Returns theonpointerup
event handler.- Returns:
- the
onpointerup
event handler
-
setOnpointerup
public void setOnpointerup(java.lang.Object onpointerup)
Sets theonpointerup
event handler.- Parameters:
onpointerup
- theonpointerup
event handler
-
getOnwheel
public org.htmlunit.corejs.javascript.Function getOnwheel()
Returns theonwheel
event handler.- Returns:
- the
onwheel
event handler
-
setOnwheel
public void setOnwheel(java.lang.Object onwheel)
Sets theonwheel
event handler.- Parameters:
onwheel
- theonwheel
event handler
-
getOnpointerleave
public org.htmlunit.corejs.javascript.Function getOnpointerleave()
Returns theonpointerleave
event handler.- Returns:
- the
onpointerleave
event handler
-
setOnpointerleave
public void setOnpointerleave(java.lang.Object onpointerleave)
Sets theonpointerleave
event handler.- Parameters:
onpointerleave
- theonpointerleave
event handler
-
getOnbeforeprint
public org.htmlunit.corejs.javascript.Function getOnbeforeprint()
Returns theonbeforeprint
event handler.- Returns:
- the
onbeforeprint
event handler
-
setOnbeforeprint
public void setOnbeforeprint(java.lang.Object onbeforeprint)
Sets theonbeforeprint
event handler.- Parameters:
onbeforeprint
- theonbeforeprint
event handler
-
getOnstorage
public org.htmlunit.corejs.javascript.Function getOnstorage()
Returns theonstorage
event handler.- Returns:
- the
onstorage
event handler
-
setOnstorage
public void setOnstorage(java.lang.Object onstorage)
Sets theonstorage
event handler.- Parameters:
onstorage
- theonstorage
event handler
-
getOnanimationstart
public org.htmlunit.corejs.javascript.Function getOnanimationstart()
Returns theonanimationstart
event handler.- Returns:
- the
onanimationstart
event handler
-
setOnanimationstart
public void setOnanimationstart(java.lang.Object onanimationstart)
Sets theonanimationstart
event handler.- Parameters:
onanimationstart
- theonanimationstart
event handler
-
getOntimeupdate
public org.htmlunit.corejs.javascript.Function getOntimeupdate()
Returns theontimeupdate
event handler.- Returns:
- the
ontimeupdate
event handler
-
setOntimeupdate
public void setOntimeupdate(java.lang.Object ontimeupdate)
Sets theontimeupdate
event handler.- Parameters:
ontimeupdate
- theontimeupdate
event handler
-
getOnpagehide
public org.htmlunit.corejs.javascript.Function getOnpagehide()
Returns theonpagehide
event handler.- Returns:
- the
onpagehide
event handler
-
setOnpagehide
public void setOnpagehide(java.lang.Object onpagehide)
Sets theonpagehide
event handler.- Parameters:
onpagehide
- theonpagehide
event handler
-
getOnwebkitanimationiteration
public org.htmlunit.corejs.javascript.Function getOnwebkitanimationiteration()
Returns theonwebkitanimationiteration
event handler.- Returns:
- the
onwebkitanimationiteration
event handler
-
setOnwebkitanimationiteration
public void setOnwebkitanimationiteration(java.lang.Object onwebkitanimationiteration)
Sets theonwebkitanimationiteration
event handler.- Parameters:
onwebkitanimationiteration
- theonwebkitanimationiteration
event handler
-
getOnabort
public org.htmlunit.corejs.javascript.Function getOnabort()
Returns theonabort
event handler.- Returns:
- the
onabort
event handler
-
setOnabort
public void setOnabort(java.lang.Object onabort)
Sets theonabort
event handler.- Parameters:
onabort
- theonabort
event handler
-
getOnloadedmetadata
public org.htmlunit.corejs.javascript.Function getOnloadedmetadata()
Returns theonloadedmetadata
event handler.- Returns:
- the
onloadedmetadata
event handler
-
setOnloadedmetadata
public void setOnloadedmetadata(java.lang.Object onloadedmetadata)
Sets theonloadedmetadata
event handler.- Parameters:
onloadedmetadata
- theonloadedmetadata
event handler
-
getOnmouseup
public org.htmlunit.corejs.javascript.Function getOnmouseup()
Returns theonmouseup
event handler.- Returns:
- the
onmouseup
event handler
-
setOnmouseup
public void setOnmouseup(java.lang.Object onmouseup)
Sets theonmouseup
event handler.- Parameters:
onmouseup
- theonmouseup
event handler
-
getOndragover
public org.htmlunit.corejs.javascript.Function getOndragover()
Returns theondragover
event handler.- Returns:
- the
ondragover
event handler
-
setOndragover
public void setOndragover(java.lang.Object ondragover)
Sets theondragover
event handler.- Parameters:
ondragover
- theondragover
event handler
-
getOnonline
public org.htmlunit.corejs.javascript.Function getOnonline()
Returns theononline
event handler.- Returns:
- the
ononline
event handler
-
setOnonline
public void setOnonline(java.lang.Object ononline)
Sets theononline
event handler.- Parameters:
ononline
- theononline
event handler
-
getOnsearch
public org.htmlunit.corejs.javascript.Function getOnsearch()
Returns theonsearch
event handler.- Returns:
- the
onsearch
event handler
-
setOnsearch
public void setOnsearch(java.lang.Object onsearch)
Sets theonsearch
event handler.- Parameters:
onsearch
- theonsearch
event handler
-
getOninput
public org.htmlunit.corejs.javascript.Function getOninput()
Returns theoninput
event handler.- Returns:
- the
oninput
event handler
-
setOninput
public void setOninput(java.lang.Object oninput)
Sets theoninput
event handler.- Parameters:
oninput
- theoninput
event handler
-
getOnwebkittransitionend
public org.htmlunit.corejs.javascript.Function getOnwebkittransitionend()
Returns theonwebkittransitionend
event handler.- Returns:
- the
onwebkittransitionend
event handler
-
setOnwebkittransitionend
public void setOnwebkittransitionend(java.lang.Object onwebkittransitionend)
Sets theonwebkittransitionend
event handler.- Parameters:
onwebkittransitionend
- theonwebkittransitionend
event handler
-
getOndevicemotion
public org.htmlunit.corejs.javascript.Function getOndevicemotion()
Returns theondevicemotion
event handler.- Returns:
- the
ondevicemotion
event handler
-
setOndevicemotion
public void setOndevicemotion(java.lang.Object ondevicemotion)
Sets theondevicemotion
event handler.- Parameters:
ondevicemotion
- theondevicemotion
event handler
-
getOnstalled
public org.htmlunit.corejs.javascript.Function getOnstalled()
Returns theonstalled
event handler.- Returns:
- the
onstalled
event handler
-
setOnstalled
public void setOnstalled(java.lang.Object onstalled)
Sets theonstalled
event handler.- Parameters:
onstalled
- theonstalled
event handler
-
getOnmouseenter
public org.htmlunit.corejs.javascript.Function getOnmouseenter()
Returns theonmouseenter
event handler.- Returns:
- the
onmouseenter
event handler
-
setOnmouseenter
public void setOnmouseenter(java.lang.Object onmouseenter)
Sets theonmouseenter
event handler.- Parameters:
onmouseenter
- theonmouseenter
event handler
-
getOndragleave
public org.htmlunit.corejs.javascript.Function getOndragleave()
Returns theondragleave
event handler.- Returns:
- the
ondragleave
event handler
-
setOndragleave
public void setOndragleave(java.lang.Object ondragleave)
Sets theondragleave
event handler.- Parameters:
ondragleave
- theondragleave
event handler
-
getOnpointerdown
public org.htmlunit.corejs.javascript.Function getOnpointerdown()
Returns theonpointerdown
event handler.- Returns:
- the
onpointerdown
event handler
-
setOnpointerdown
public void setOnpointerdown(java.lang.Object onpointerdown)
Sets theonpointerdown
event handler.- Parameters:
onpointerdown
- theonpointerdown
event handler
-
getOndrop
public org.htmlunit.corejs.javascript.Function getOndrop()
Returns theondrop
event handler.- Returns:
- the
ondrop
event handler
-
setOndrop
public void setOndrop(java.lang.Object ondrop)
Sets theondrop
event handler.- Parameters:
ondrop
- theondrop
event handler
-
getOnunload
public org.htmlunit.corejs.javascript.Function getOnunload()
Returns theonunload
event handler.- Returns:
- the
onunload
event handler
-
setOnunload
public void setOnunload(java.lang.Object onunload)
Sets theonunload
event handler.- Parameters:
onunload
- theonunload
event handler
-
getOnwebkitanimationend
public org.htmlunit.corejs.javascript.Function getOnwebkitanimationend()
Returns theonwebkitanimationend
event handler.- Returns:
- the
onwebkitanimationend
event handler
-
setOnwebkitanimationend
public void setOnwebkitanimationend(java.lang.Object onwebkitanimationend)
Sets theonwebkitanimationend
event handler.- Parameters:
onwebkitanimationend
- theonwebkitanimationend
event handler
-
getOndragstart
public org.htmlunit.corejs.javascript.Function getOndragstart()
Returns theondragstart
event handler.- Returns:
- the
ondragstart
event handler
-
setOndragstart
public void setOndragstart(java.lang.Object ondragstart)
Sets theondragstart
event handler.- Parameters:
ondragstart
- theondragstart
event handler
-
getOntransitionend
public org.htmlunit.corejs.javascript.Function getOntransitionend()
Returns theontransitionend
event handler.- Returns:
- the
ontransitionend
event handler
-
setOntransitionend
public void setOntransitionend(java.lang.Object ontransitionend)
Sets theontransitionend
event handler.- Parameters:
ontransitionend
- theontransitionend
event handler
-
getOndeviceorientationabsolute
public org.htmlunit.corejs.javascript.Function getOndeviceorientationabsolute()
Returns theondeviceorientationabsolute
event handler.- Returns:
- the
ondeviceorientationabsolute
event handler
-
setOndeviceorientationabsolute
public void setOndeviceorientationabsolute(java.lang.Object ondeviceorientationabsolute)
Sets theondeviceorientationabsolute
event handler.- Parameters:
ondeviceorientationabsolute
- theondeviceorientationabsolute
event handler
-
getOnvolumechange
public org.htmlunit.corejs.javascript.Function getOnvolumechange()
Returns theonvolumechange
event handler.- Returns:
- the
onvolumechange
event handler
-
setOnvolumechange
public void setOnvolumechange(java.lang.Object onvolumechange)
Sets theonvolumechange
event handler.- Parameters:
onvolumechange
- theonvolumechange
event handler
-
getOngotpointercapture
public org.htmlunit.corejs.javascript.Function getOngotpointercapture()
Returns theongotpointercapture
event handler.- Returns:
- the
ongotpointercapture
event handler
-
setOngotpointercapture
public void setOngotpointercapture(java.lang.Object ongotpointercapture)
Sets theongotpointercapture
event handler.- Parameters:
ongotpointercapture
- theongotpointercapture
event handler
-
getOnpopstate
public org.htmlunit.corejs.javascript.Function getOnpopstate()
Returns theonpopstate
event handler.- Returns:
- the
onpopstate
event handler
-
setOnpopstate
public void setOnpopstate(java.lang.Object onpopstate)
Sets theonpopstate
event handler.- Parameters:
onpopstate
- theonpopstate
event handler
-
getBrowserVersion
public BrowserVersion getBrowserVersion()
Gets the browser version currently used. optimized version- Overrides:
getBrowserVersion
in classHtmlUnitScriptable
- Returns:
- the browser version
-
put
public void put(java.lang.String name, org.htmlunit.corejs.javascript.Scriptable start, java.lang.Object value)
Description copied from class:HtmlUnitScriptable
- Specified by:
put
in interfaceorg.htmlunit.corejs.javascript.Scriptable
- Overrides:
put
in classHtmlUnitScriptable
-
getIsSecureContext
public java.lang.Object getIsSecureContext()
- Returns:
- a boolean indicating whether the current context is secure (true) or not (false).
-
-