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:
Serializable
,AutoCloseable
,Cloneable
,org.htmlunit.corejs.javascript.ConstProperties
,org.htmlunit.corejs.javascript.debug.DebuggableObject
,org.htmlunit.corejs.javascript.Scriptable
,org.htmlunit.corejs.javascript.SymbolScriptable
,WindowOrWorkerGlobalScope
A JavaScript object for
Window
.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private static final class
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List
<Window.AnimationFrame> private Object
private Object
private Crypto
private Event
private Document
private DocumentProxy
private History
private Location
private static final org.apache.commons.logging.Log
private Navigator
private Object
static final int
To be documented.private Map
<Class<? extends org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable> private Screen
private Selection
private String
private final EnumMap
<StorageHolder.Type, Storage> static final int
To be documented.private Object
private WebWindow
private WindowProxy
Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
Fields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
The JavaScript functionalert()
.int
Invokes all the animation callbacks registered for this window by callingrequestAnimationFrame(Object)
once.Decodes a string of data which has been encoded using base-64 encoding.void
blur()
Removes focus from this element.Creates a base-64 encoded ASCII string from a string of binary data.void
cancelAnimationFrame
(Object requestId) Remove the callback from the list of animationFrames.void
captureEvents
(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
The JavaScript functionconfirm
.boolean
dispatchEvent
(Event event) Dispatches an event into the event system (standards-conformant browsers only).void
Logs messages to the browser's standard output (stdout).boolean
find
(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.get
(int index, org.htmlunit.corejs.javascript.Scriptable start) Gets the browser version currently used.Returns the JavaScript propertyclientInformation
.getComputedStyle
(Object element, String pseudoElement) Returns computed style of the element.Gets thecontrollers
.Returns thecrypto
property.Returns the current event (used internally regardless of the emulation mode).int
Returns thedevicePixelRatio
property.Returns the window's current document.Returns the JavaScript propertydocument
.private Object
getElementsByName
(HtmlPage page, String name) getEvent()
Returns the current event.Returns theexternal
property.Returns the (i)frame in which the window is contained.private HTMLCollection
Returns the live collection of frames contained by this window.Returns the value of theframes
property.private static Object
getFrameWindowByName
(HtmlPage page, String name) Returns thehistory
property.int
Returns theinnerHeight
.int
Returns theinnerWidth
.int
Returns the number of frames contained by this window.Returns thelocalStorage
property.Returns thelocation
property.int
Returns the value ofmozInnerScreenX
property.int
Returns the value ofmozInnerScreenY
property.getName()
Returns the value of the window'sname
property.Returns the JavaScript propertynavigator
.Returns the value ofnetscape
property.Returns theoffscreenBuffering
property.org.htmlunit.corejs.javascript.Function
Returns theonabort
event handler.org.htmlunit.corejs.javascript.Function
Returns theonafterprint
event handler.org.htmlunit.corejs.javascript.Function
Returns theonanimationend
event handler.org.htmlunit.corejs.javascript.Function
Returns theonanimationiteration
event handler.org.htmlunit.corejs.javascript.Function
Returns theonanimationstart
event handler.org.htmlunit.corejs.javascript.Function
Returns theonauxclick
event handler.org.htmlunit.corejs.javascript.Function
Returns theonbeforeprint
event handler.Returns the value of the window'sonbeforeunload
property.Returns theonblur
property (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.Function
Returns theoncancel
event handler.org.htmlunit.corejs.javascript.Function
Returns theoncanplay
event handler.org.htmlunit.corejs.javascript.Function
Returns theoncanplaythrough
event handler.Getter for theonchange
event handler.Returns theonclick
property (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.Function
Returns theonclose
event handler.org.htmlunit.corejs.javascript.Function
Returns theoncontextmenu
event handler.org.htmlunit.corejs.javascript.Function
Returns theoncuechange
event handler.Returns theondblclick
property (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.Function
Returns theondevicemotion
event handler.org.htmlunit.corejs.javascript.Function
Returns theondeviceorientation
event handler.org.htmlunit.corejs.javascript.Function
Returns theondeviceorientationabsolute
event handler.org.htmlunit.corejs.javascript.Function
Returns theondrag
event handler.org.htmlunit.corejs.javascript.Function
Returns theondragend
event handler.org.htmlunit.corejs.javascript.Function
Returns theondragenter
event handler.org.htmlunit.corejs.javascript.Function
Returns theondragleave
event handler.org.htmlunit.corejs.javascript.Function
Returns theondragover
event handler.org.htmlunit.corejs.javascript.Function
Returns theondragstart
event handler.org.htmlunit.corejs.javascript.Function
Returns theondrop
event handler.org.htmlunit.corejs.javascript.Function
Returns theondurationchange
event handler.org.htmlunit.corejs.javascript.Function
Returns theonemptied
event handler.org.htmlunit.corejs.javascript.Function
Returns theonended
event handler.Returns the value of the window'sonerror
property.org.htmlunit.corejs.javascript.Function
Returns theonfocus
event handler.org.htmlunit.corejs.javascript.Function
Returns theongotpointercapture
event handler.Returns theonhashchange
property (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.Function
Returns theoninput
event handler.org.htmlunit.corejs.javascript.Function
Returns theoninvalid
event handler.org.htmlunit.corejs.javascript.Function
Returns theonkeydown
event handler.org.htmlunit.corejs.javascript.Function
Returns theonkeypress
event handler.org.htmlunit.corejs.javascript.Function
Returns theonkeyup
event handler.org.htmlunit.corejs.javascript.Function
Returns theonlanguagechange
event handler.Returns theonload
property.org.htmlunit.corejs.javascript.Function
Returns theonloadeddata
event handler.org.htmlunit.corejs.javascript.Function
Returns theonloadedmetadata
event handler.org.htmlunit.corejs.javascript.Function
Returns theonloadstart
event handler.org.htmlunit.corejs.javascript.Function
Returns theonlostpointercapture
event handler.Returns the value of the window'sonmessage
property.org.htmlunit.corejs.javascript.Function
Returns theonmousedown
event handler.org.htmlunit.corejs.javascript.Function
Returns theonmouseenter
event handler.org.htmlunit.corejs.javascript.Function
Returns theonmouseleave
event handler.org.htmlunit.corejs.javascript.Function
Returns theonmousemove
event handler.org.htmlunit.corejs.javascript.Function
Returns theonmouseout
event handler.org.htmlunit.corejs.javascript.Function
Returns theonmouseover
event handler.org.htmlunit.corejs.javascript.Function
Returns theonmouseup
event handler.org.htmlunit.corejs.javascript.Function
Returns theonmousewheel
event handler.org.htmlunit.corejs.javascript.Function
Returns theonmozfullscreenchange
event handler.org.htmlunit.corejs.javascript.Function
Returns theonmozfullscreenerror
event handler.org.htmlunit.corejs.javascript.Function
Returns theonoffline
event handler.org.htmlunit.corejs.javascript.Function
Returns theononline
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpagehide
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpageshow
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpause
event handler.org.htmlunit.corejs.javascript.Function
Returns theonplay
event handler.org.htmlunit.corejs.javascript.Function
Returns theonplaying
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpointercancel
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpointerdown
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpointerenter
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpointerleave
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpointermove
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpointerout
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpointerover
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpointerup
event handler.org.htmlunit.corejs.javascript.Function
Returns theonpopstate
event handler.org.htmlunit.corejs.javascript.Function
Returns theonprogress
event handler.org.htmlunit.corejs.javascript.Function
Returns theonratechange
event handler.org.htmlunit.corejs.javascript.Function
Returns theonrejectionhandled
event handler.org.htmlunit.corejs.javascript.Function
Returns theonreset
event handler.org.htmlunit.corejs.javascript.Function
Returns theonresize
event handler.org.htmlunit.corejs.javascript.Function
Returns theonscroll
event handler.org.htmlunit.corejs.javascript.Function
Returns theonsearch
event handler.org.htmlunit.corejs.javascript.Function
Returns theonseeked
event handler.org.htmlunit.corejs.javascript.Function
Returns theonseeking
event handler.org.htmlunit.corejs.javascript.Function
Returns theonselect
event handler.org.htmlunit.corejs.javascript.Function
Returns theonstalled
event handler.org.htmlunit.corejs.javascript.Function
Returns theonstorage
event handler.Getter for theonsubmit
event handler.org.htmlunit.corejs.javascript.Function
Returns theonsuspend
event handler.org.htmlunit.corejs.javascript.Function
Returns theontimeupdate
event handler.org.htmlunit.corejs.javascript.Function
Returns theontoggle
event handler.org.htmlunit.corejs.javascript.Function
Returns theontransitionend
event handler.org.htmlunit.corejs.javascript.Function
Returns theonunhandledrejection
event handler.org.htmlunit.corejs.javascript.Function
Returns theonunload
event handler.org.htmlunit.corejs.javascript.Function
Returns theonvolumechange
event handler.org.htmlunit.corejs.javascript.Function
Returns theonwaiting
event handler.org.htmlunit.corejs.javascript.Function
Returns theonwebkitanimationend
event handler.org.htmlunit.corejs.javascript.Function
Returns theonwebkitanimationiteration
event handler.org.htmlunit.corejs.javascript.Function
Returns theonwebkitanimationstart
event handler.org.htmlunit.corejs.javascript.Function
Returns theonwebkittransitionend
event handler.org.htmlunit.corejs.javascript.Function
Returns theonwheel
event handler.Returns the value of theopener
property.int
Returns theouterHeight
.int
Returns theouterWidth
.int
Returns the value ofpageXOffset
property.int
Returns the value ofpageYOffset
property.org.htmlunit.corejs.javascript.ScriptableObject
Returns the value of theparent
property.Returns theperformance
property.static int
Returns the port of the specified URL.org.htmlunit.corejs.javascript.Scriptable
getPrototype
(Class<? extends HtmlUnitScriptable> jsClass) Returns the prototype object corresponding to the specified HtmlUnit class inside the window scope.static WindowProxy
Returns the proxy for the specified window.Returns thescreen
property.int
Returns the value ofscrollX
property.int
Returns the value ofscrollY
property.Returns the current selection.Returns the current selection.getSelf()
Returns theself
property.Returns thesessionStorage
property.Returns thespeechSynthesis
property.Returns the text from the status line.getStorage
(StorageHolder.Type storageType) Gets the storage of the specified type.Returns thestyleMedia
property.getTop()
Returns the value of thetop
property.Returns the WebWindow associated with this Window.Returns the window property.getWithFallback
(String name) To be called when the property detection fails in normal scenarios.void
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
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, Object[] args, org.htmlunit.corejs.javascript.Function ctorObj, boolean inNewExpr) Creates an instance.private URL
makeUrlForOpenWindow
(String urlString) matchMedia
(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.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, Object[] args, org.htmlunit.corejs.javascript.Function funObj) Posts a message.void
print()
Prints the current page.The JavaScript functionprompt
.void
private void
readObject
(ObjectInputStream stream) Restores the transient fields during deserialization.void
releaseEvents
(String type) Does nothing special anymore.int
requestAnimationFrame
(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
(Object clientInformation) void
setControllers
(Object value) Sets thecontrollers
.void
setCurrentEvent
(Event event) Sets the current event.private void
setHandlerForJavaScript
(String eventName, Object handler) void
setInnerHeight
(int height) Sets theinnerHeight
.void
setInnerWidth
(int width) Sets theinnerWidth
.static Object
setInterval
(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, 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
(String newLocation) Sets thelocation
property.void
Sets the value of the window'sname
property.void
setOnabort
(Object onabort) Sets theonabort
event handler.void
setOnafterprint
(Object onafterprint) Sets theonafterprint
event handler.void
setOnanimationend
(Object onanimationend) Sets theonanimationend
event handler.void
setOnanimationiteration
(Object onanimationiteration) Sets theonanimationiteration
event handler.void
setOnanimationstart
(Object onanimationstart) Sets theonanimationstart
event handler.void
setOnauxclick
(Object onauxclick) Sets theonauxclick
event handler.void
setOnbeforeprint
(Object onbeforeprint) Sets theonbeforeprint
event handler.void
setOnbeforeunload
(Object onbeforeunload) Sets the value of the window'sonbeforeunload
property.void
Sets the value of theonblur
event handler.void
setOncancel
(Object oncancel) Sets theoncancel
event handler.void
setOncanplay
(Object oncanplay) Sets theoncanplay
event handler.void
setOncanplaythrough
(Object oncanplaythrough) Sets theoncanplaythrough
event handler.void
setOnchange
(Object onchange) Setter for theonchange
event handler.void
setOnclick
(Object onclick) Sets the value of theonclick
event handler.void
setOnclose
(Object onclose) Sets theonclose
event handler.void
setOncontextmenu
(Object oncontextmenu) Sets theoncontextmenu
event handler.void
setOncuechange
(Object oncuechange) Sets theoncuechange
event handler.void
setOndblclick
(Object ondblclick) Sets the value of theondblclick
event handler.void
setOndevicemotion
(Object ondevicemotion) Sets theondevicemotion
event handler.void
setOndeviceorientation
(Object ondeviceorientation) Sets theondeviceorientation
event handler.void
setOndeviceorientationabsolute
(Object ondeviceorientationabsolute) Sets theondeviceorientationabsolute
event handler.void
Sets theondrag
event handler.void
setOndragend
(Object ondragend) Sets theondragend
event handler.void
setOndragenter
(Object ondragenter) Sets theondragenter
event handler.void
setOndragleave
(Object ondragleave) Sets theondragleave
event handler.void
setOndragover
(Object ondragover) Sets theondragover
event handler.void
setOndragstart
(Object ondragstart) Sets theondragstart
event handler.void
Sets theondrop
event handler.void
setOndurationchange
(Object ondurationchange) Sets theondurationchange
event handler.void
setOnemptied
(Object onemptied) Sets theonemptied
event handler.void
setOnended
(Object onended) Sets theonended
event handler.void
setOnerror
(Object onerror) Sets the value of the window'sonerror
property.void
setOnfocus
(Object onfocus) Sets theonfocus
event handler.void
setOngotpointercapture
(Object ongotpointercapture) Sets theongotpointercapture
event handler.void
setOnhashchange
(Object onhashchange) Sets the value of theonhashchange
event handler.void
setOninput
(Object oninput) Sets theoninput
event handler.void
setOninvalid
(Object oninvalid) Sets theoninvalid
event handler.void
setOnkeydown
(Object onkeydown) Sets theonkeydown
event handler.void
setOnkeypress
(Object onkeypress) Sets theonkeypress
event handler.void
setOnkeyup
(Object onkeyup) Sets theonkeyup
event handler.void
setOnlanguagechange
(Object onlanguagechange) Sets theonlanguagechange
event handler.void
Sets the value of theonload
event handler.void
setOnloadeddata
(Object onloadeddata) Sets theonloadeddata
event handler.void
setOnloadedmetadata
(Object onloadedmetadata) Sets theonloadedmetadata
event handler.void
setOnloadstart
(Object onloadstart) Sets theonloadstart
event handler.void
setOnlostpointercapture
(Object onlostpointercapture) Sets theonlostpointercapture
event handler.void
setOnmessage
(Object onmessage) Sets the value of the window'sonmessage
property.void
setOnmousedown
(Object onmousedown) Sets theonmousedown
event handler.void
setOnmouseenter
(Object onmouseenter) Sets theonmouseenter
event handler.void
setOnmouseleave
(Object onmouseleave) Sets theonmouseleave
event handler.void
setOnmousemove
(Object onmousemove) Sets theonmousemove
event handler.void
setOnmouseout
(Object onmouseout) Sets theonmouseout
event handler.void
setOnmouseover
(Object onmouseover) Sets theonmouseover
event handler.void
setOnmouseup
(Object onmouseup) Sets theonmouseup
event handler.void
setOnmousewheel
(Object onmousewheel) Sets theonmousewheel
event handler.void
setOnmozfullscreenchange
(Object onmozfullscreenchange) Sets theonmozfullscreenchange
event handler.void
setOnmozfullscreenerror
(Object onmozfullscreenerror) Sets theonmozfullscreenerror
event handler.void
setOnoffline
(Object onoffline) Sets theonoffline
event handler.void
setOnonline
(Object ononline) Sets theononline
event handler.void
setOnpagehide
(Object onpagehide) Sets theonpagehide
event handler.void
setOnpageshow
(Object onpageshow) Sets theonpageshow
event handler.void
setOnpause
(Object onpause) Sets theonpause
event handler.void
Sets theonplay
event handler.void
setOnplaying
(Object onplaying) Sets theonplaying
event handler.void
setOnpointercancel
(Object onpointercancel) Sets theonpointercancel
event handler.void
setOnpointerdown
(Object onpointerdown) Sets theonpointerdown
event handler.void
setOnpointerenter
(Object onpointerenter) Sets theonpointerenter
event handler.void
setOnpointerleave
(Object onpointerleave) Sets theonpointerleave
event handler.void
setOnpointermove
(Object onpointermove) Sets theonpointermove
event handler.void
setOnpointerout
(Object onpointerout) Sets theonpointerout
event handler.void
setOnpointerover
(Object onpointerover) Sets theonpointerover
event handler.void
setOnpointerup
(Object onpointerup) Sets theonpointerup
event handler.void
setOnpopstate
(Object onpopstate) Sets theonpopstate
event handler.void
setOnprogress
(Object onprogress) Sets theonprogress
event handler.void
setOnratechange
(Object onratechange) Sets theonratechange
event handler.void
setOnrejectionhandled
(Object onrejectionhandled) Sets theonrejectionhandled
event handler.void
setOnreset
(Object onreset) Sets theonreset
event handler.void
setOnresize
(Object onresize) Sets theonresize
event handler.void
setOnscroll
(Object onscroll) Sets theonscroll
event handler.void
setOnsearch
(Object onsearch) Sets theonsearch
event handler.void
setOnseeked
(Object onseeked) Sets theonseeked
event handler.void
setOnseeking
(Object onseeking) Sets theonseeking
event handler.void
setOnselect
(Object onselect) Sets theonselect
event handler.void
setOnstalled
(Object onstalled) Sets theonstalled
event handler.void
setOnstorage
(Object onstorage) Sets theonstorage
event handler.void
setOnsubmit
(Object onsubmit) Setter for theonsubmit
event handler.void
setOnsuspend
(Object onsuspend) Sets theonsuspend
event handler.void
setOntimeupdate
(Object ontimeupdate) Sets theontimeupdate
event handler.void
setOntoggle
(Object ontoggle) Sets theontoggle
event handler.void
setOntransitionend
(Object ontransitionend) Sets theontransitionend
event handler.void
setOnunhandledrejection
(Object onunhandledrejection) Sets theonunhandledrejection
event handler.void
setOnunload
(Object onunload) Sets theonunload
event handler.void
setOnvolumechange
(Object onvolumechange) Sets theonvolumechange
event handler.void
setOnwaiting
(Object onwaiting) Sets theonwaiting
event handler.void
setOnwebkitanimationend
(Object onwebkitanimationend) Sets theonwebkitanimationend
event handler.void
setOnwebkitanimationiteration
(Object onwebkitanimationiteration) Sets theonwebkitanimationiteration
event handler.void
setOnwebkitanimationstart
(Object onwebkitanimationstart) Sets theonwebkitanimationstart
event handler.void
setOnwebkittransitionend
(Object onwebkittransitionend) Sets theonwebkittransitionend
event handler.void
setOnwheel
(Object onwheel) Sets theonwheel
event handler.void
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
(Map<Class<? extends org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable> map) Sets the prototypes for HtmlUnit host classes.void
Sets the text from the status line.static Object
setTimeout
(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function) Sets a chunk of JavaScript to be invoked at some specified time later.void
Sets the value of thetop
property.void
stop()
Should implement the stop() function on the window object.void
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 Details
-
LOG
private static final org.apache.commons.logging.Log LOG -
TEMPORARY
public static final int TEMPORARYTo be documented.- See Also:
-
PERSISTENT
public static final int PERSISTENTTo be documented.- See Also:
-
document_
-
documentProxy_
-
clientInformation_
-
webWindow_
-
windowProxy_
-
screen_
-
history_
-
location_
-
selection_
-
currentEvent_
-
status_
-
prototypes_
-
controllers_
-
opener_
-
top_
-
crypto_
-
storages_
-
animationFrames_
-
-
Constructor Details
-
Window
public Window()Creates an instance.
-
-
Method Details
-
jsConstructor
public static org.htmlunit.corejs.javascript.Scriptable jsConstructor(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, 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
Restores the transient fields during deserialization.- Parameters:
stream
- the stream to read the object from- Throws:
IOException
- if an IO error occursClassNotFoundException
- if a class is not found
-
getPrototype
public org.htmlunit.corejs.javascript.Scriptable getPrototype(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(Map<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
The JavaScript functionalert()
.- Parameters:
message
- the message
-
btoa
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
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
The JavaScript functionconfirm
.- Parameters:
message
- the message- Returns:
- true if ok was pressed, false if cancel was pressed
-
prompt
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
Returns the JavaScript propertydocument
.- Returns:
- the document
-
getDocument
Returns the window's current document.- Returns:
- the window's current document
-
getEvent
Returns the current event.- Returns:
- the current event, or
null
if no event is currently available
-
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
Sets the current event.- Parameters:
event
- the current event
-
open
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:
-
makeUrlForOpenWindow
-
setTimeout
public static Object setTimeout(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, 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:
-
setInterval
public static Object setInterval(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, 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:
-
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:
-
getClientInformation
Returns the JavaScript propertyclientInformation
.- Returns:
- the client information
-
setClientInformation
- Parameters:
clientInformation
- the new value
-
getWindow_js
Returns the window property. This is a synonym forself
.- Returns:
- the window property (a reference to
this
)
-
getSelf
Returns theself
property.- Returns:
- this
-
getLocalStorage
Returns thelocalStorage
property.- Returns:
- the
localStorage
property
-
getSessionStorage
Returns thesessionStorage
property.- Returns:
- the
sessionStorage
property
-
getStorage
Gets the storage of the specified type.- Parameters:
storageType
- the type- Returns:
- the storage
-
getLocation
Returns thelocation
property.- Returns:
- the
location
property
-
setLocation
Sets thelocation
property. This will cause a reload of the window.- Parameters:
newLocation
- the URL of the new content- Throws:
IOException
- when location loading fails
-
dump
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
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:
-
cancelAnimationFrame
Remove the callback from the list of animationFrames.- Parameters:
requestId
- the ID value returned by the call to window.requestAnimationFrame()- See Also:
-
getScreen
Returns thescreen
property.- Returns:
- the
screen
property
-
getHistory
Returns thehistory
property.- Returns:
- the
history
property
-
getExternal
Returns theexternal
property.- Returns:
- the
external
property
-
initialize
Initializes this window.- Parameters:
webWindow
- the web window corresponding to this windowpageToEnclose
- the page that will become the enclosing page
-
initialize
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
Returns the value of thetop
property.- Returns:
- the value of
top
-
setTop
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
Returns the value of theopener
property.- Returns:
- the value of the
opener
, ornull
for a top level window
-
setOpener
Sets theopener
property.- Parameters:
newValue
- the new value
-
getFrameElement
Returns the (i)frame in which the window is contained.- Returns:
null
for a top level 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
Returns the live collection of frames contained by this window.- Returns:
- the live collection of frames contained by this window
-
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
Returns theonload
property. Note that this is not necessarily a function if something else has been set.- Returns:
- the
onload
property
-
setOnload
Sets the value of theonload
event handler.- Parameters:
onload
- the new handler
-
setOnblur
Sets the value of theonblur
event handler.- Parameters:
onblur
- the new handler
-
getOnblur
Returns theonblur
property (not necessary a function if something else has been set).- Returns:
- the
onblur
property
-
getOnclick
Returns theonclick
property (not necessary a function if something else has been set).- Returns:
- the
onclick
property
-
setOnclick
Sets the value of theonclick
event handler.- Parameters:
onclick
- the new handler
-
getOndblclick
Returns theondblclick
property (not necessary a function if something else has been set).- Returns:
- the
ondblclick
property
-
setOndblclick
Sets the value of theondblclick
event handler.- Parameters:
ondblclick
- the new handler
-
getOnhashchange
Returns theonhashchange
property (not necessary a function if something else has been set).- Returns:
- the
onhashchange
property
-
setOnhashchange
Sets the value of theonhashchange
event handler.- Parameters:
onhashchange
- the new handler
-
getName
Returns the value of the window'sname
property.- Returns:
- the value of the window's
name
property
-
setName
Sets the value of the window'sname
property.- Parameters:
name
- the value of the window'sname
property
-
getOnbeforeunload
Returns the value of the window'sonbeforeunload
property.- Returns:
- the value of the window's
onbeforeunload
property
-
setOnbeforeunload
Sets the value of the window'sonbeforeunload
property.- Parameters:
onbeforeunload
- the value of the window'sonbeforeunload
property
-
getOnerror
Returns the value of the window'sonerror
property.- Returns:
- the value of the window's
onerror
property
-
setOnerror
Sets the value of the window'sonerror
property.- Parameters:
onerror
- the value of the window'sonerror
property
-
getOnmessage
Returns the value of the window'sonmessage
property.- Returns:
- the value of the window's
onmessage
property
-
setOnmessage
Sets the value of the window'sonmessage
property.- Parameters:
onmessage
- the value of the window'sonmessage
property
-
triggerOnError
Triggers theonerror
handler, if one has been set.- Parameters:
e
- the error that needs to be reported
-
setHandlerForJavaScript
-
getWithFallback
To be called when the property detection fails in normal scenarios.- Parameters:
name
- the name- Returns:
- the found object, or
Scriptable.NOT_FOUND
-
get
- Specified by:
get
in interfaceorg.htmlunit.corejs.javascript.Scriptable
- Overrides:
get
in classorg.htmlunit.corejs.javascript.ScriptableObject
-
getFrameWindowByName
-
getElementsByName
-
getProxy
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
Returns the text from the status line.- Returns:
- the status line text
-
setStatus
Sets the text from the status line.- Parameters:
message
- the status line text
-
getInnerWidth
public int getInnerWidth()Returns theinnerWidth
.- Returns:
- the
innerWidth
- See Also:
-
setInnerWidth
public void setInnerWidth(int width) Sets theinnerWidth
.- Parameters:
width
- theinnerWidth
-
getOuterWidth
public int getOuterWidth()Returns theouterWidth
.- Returns:
- the
outerWidth
- See Also:
-
setOuterWidth
public void setOuterWidth(int width) Sets theouterWidth
.- Parameters:
width
- theouterWidth
-
getInnerHeight
public int getInnerHeight()Returns theinnerHeight
.- Returns:
- the
innerHeight
- See Also:
-
setInnerHeight
public void setInnerHeight(int height) Sets theinnerHeight
.- Parameters:
height
- theinnerHeight
-
getOuterHeight
public int getOuterHeight()Returns theouterHeight
.- Returns:
- the
outerHeight
- See Also:
-
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:
-
captureEvents
Does nothing special anymore.- Parameters:
type
- the type of events to capture- See Also:
-
releaseEvents
Does nothing special anymore.- Parameters:
type
- the type of events to capture- See Also:
-
getComputedStyle
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
Returns the current selection.- Returns:
- the current selection
-
getSelectionImpl
Returns the current selection.- Returns:
- the current selection
-
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:
-
setControllers
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:
-
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
Returns the value ofnetscape
property.- Returns:
- the value of
netscape
property
-
isConst
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
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
Getter for theonchange
event handler.- Returns:
- the handler
-
setOnchange
Setter for theonchange
event handler.- Parameters:
onchange
- the handler
-
getOnsubmit
Getter for theonsubmit
event handler.- Returns:
- the handler
-
setOnsubmit
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, 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:
-
getPort
Returns the port of the specified URL.- Parameters:
url
- the URL- Returns:
- the port
-
getPerformance
Returns theperformance
property.- Returns:
- the
performance
property
-
getDevicePixelRatio
public int getDevicePixelRatio()Returns thedevicePixelRatio
property.- Returns:
- the
devicePixelRatio
property
-
getStyleMedia
Returns thestyleMedia
property.- Returns:
- the
styleMedia
property
-
matchMedia
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(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
Returns thespeechSynthesis
property.- Returns:
- the
speechSynthesis
property
-
getOffscreenBuffering
Returns theoffscreenBuffering
property.- Returns:
- the
offscreenBuffering
property
-
getCrypto
Returns thecrypto
property.- Returns:
- the
crypto
property
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Sets theonplay
event handler.- Parameters:
onplay
- theonplay
event handler
-
getOnmousemove
public org.htmlunit.corejs.javascript.Function getOnmousemove()Returns theonmousemove
event handler.- Returns:
- the
onmousemove
event handler
-
setOnmousemove
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
Sets theonpopstate
event handler.- Parameters:
onpopstate
- theonpopstate
event handler
-
getBrowserVersion
Gets the browser version currently used. optimized version- Overrides:
getBrowserVersion
in classHtmlUnitScriptable
- Returns:
- the browser version
-
put
Description copied from class:HtmlUnitScriptable
- Specified by:
put
in interfaceorg.htmlunit.corejs.javascript.Scriptable
- Overrides:
put
in classHtmlUnitScriptable
-
getIsSecureContext
- Returns:
- a boolean indicating whether the current context is secure (true) or not (false).
-