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 classprivate static final classNested 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 Objectprivate Objectprivate Cryptoprivate Eventprivate Documentprivate DocumentProxyprivate Historyprivate Locationprivate static final org.apache.commons.logging.Logprivate Navigatorprivate Objectstatic final intTo be documented.private Map<Class<? extends org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable> private Screenprivate Selectionprivate Stringprivate final EnumMap<StorageHolder.Type, Storage> static final intTo be documented.private Objectprivate WebWindowprivate WindowProxyFields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidThe JavaScript functionalert().intInvokes 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.voidblur()Removes focus from this element.Creates a base-64 encoded ASCII string from a string of binary data.voidcancelAnimationFrame(Object requestId) Remove the callback from the list of animationFrames.voidcaptureEvents(String type) Does nothing special anymore.voidclearInterval(int intervalID) Cancels the interval previously started using thesetInterval(Context, Scriptable, Scriptable, Object[], Function)method.voidclearTimeout(int timeoutId) Cancels a time-out previously set with thesetTimeout(Context, Scriptable, Scriptable, Object[], Function)method.voidclose()voidclose_js()Closes this window.booleanThe JavaScript functionconfirm.booleandispatchEvent(Event event) Dispatches an event into the event system (standards-conformant browsers only).voidLogs messages to the browser's standard output (stdout).booleanfind(String search, boolean caseSensitive, boolean backwards, boolean wrapAround, boolean wholeWord, boolean searchInFrames, boolean showDialog) Stub only at the moment.voidfocus()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 thecryptoproperty.Returns the current event (used internally regardless of the emulation mode).intReturns thedevicePixelRatioproperty.Returns the window's current document.Returns the JavaScript propertydocument.private ObjectgetElementsByName(HtmlPage page, String name) getEvent()Returns the current event.Returns theexternalproperty.Returns the (i)frame in which the window is contained.private HTMLCollectionReturns the live collection of frames contained by this window.Returns the value of theframesproperty.private static ObjectgetFrameWindowByName(HtmlPage page, String name) Returns thehistoryproperty.intReturns theinnerHeight.intReturns theinnerWidth.intReturns the number of frames contained by this window.Returns thelocalStorageproperty.Returns thelocationproperty.intReturns the value ofmozInnerScreenXproperty.intReturns the value ofmozInnerScreenYproperty.getName()Returns the value of the window'snameproperty.Returns the JavaScript propertynavigator.Returns the value ofnetscapeproperty.Returns theoffscreenBufferingproperty.org.htmlunit.corejs.javascript.FunctionReturns theonabortevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonafterprintevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonanimationendevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonanimationiterationevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonanimationstartevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonauxclickevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonbeforeprintevent handler.Returns the value of the window'sonbeforeunloadproperty.Returns theonblurproperty (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.FunctionReturns theoncancelevent handler.org.htmlunit.corejs.javascript.FunctionReturns theoncanplayevent handler.org.htmlunit.corejs.javascript.FunctionReturns theoncanplaythroughevent handler.Getter for theonchangeevent handler.Returns theonclickproperty (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.FunctionReturns theoncloseevent handler.org.htmlunit.corejs.javascript.FunctionReturns theoncontextmenuevent handler.org.htmlunit.corejs.javascript.FunctionReturns theoncuechangeevent handler.Returns theondblclickproperty (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.FunctionReturns theondevicemotionevent handler.org.htmlunit.corejs.javascript.FunctionReturns theondeviceorientationevent handler.org.htmlunit.corejs.javascript.FunctionReturns theondeviceorientationabsoluteevent handler.org.htmlunit.corejs.javascript.FunctionReturns theondragevent handler.org.htmlunit.corejs.javascript.FunctionReturns theondragendevent handler.org.htmlunit.corejs.javascript.FunctionReturns theondragenterevent handler.org.htmlunit.corejs.javascript.FunctionReturns theondragleaveevent handler.org.htmlunit.corejs.javascript.FunctionReturns theondragoverevent handler.org.htmlunit.corejs.javascript.FunctionReturns theondragstartevent handler.org.htmlunit.corejs.javascript.FunctionReturns theondropevent handler.org.htmlunit.corejs.javascript.FunctionReturns theondurationchangeevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonemptiedevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonendedevent handler.Returns the value of the window'sonerrorproperty.org.htmlunit.corejs.javascript.FunctionReturns theonfocusevent handler.org.htmlunit.corejs.javascript.FunctionReturns theongotpointercaptureevent handler.Returns theonhashchangeproperty (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.FunctionReturns theoninputevent handler.org.htmlunit.corejs.javascript.FunctionReturns theoninvalidevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonkeydownevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonkeypressevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonkeyupevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonlanguagechangeevent handler.Returns theonloadproperty.org.htmlunit.corejs.javascript.FunctionReturns theonloadeddataevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonloadedmetadataevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonloadstartevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonlostpointercaptureevent handler.Returns the value of the window'sonmessageproperty.org.htmlunit.corejs.javascript.FunctionReturns theonmousedownevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonmouseenterevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonmouseleaveevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonmousemoveevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonmouseoutevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonmouseoverevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonmouseupevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonmousewheelevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonmozfullscreenchangeevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonmozfullscreenerrorevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonofflineevent handler.org.htmlunit.corejs.javascript.FunctionReturns theononlineevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpagehideevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpageshowevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpauseevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonplayevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonplayingevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpointercancelevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpointerdownevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpointerenterevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpointerleaveevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpointermoveevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpointeroutevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpointeroverevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpointerupevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonpopstateevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonprogressevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonratechangeevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonrejectionhandledevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonresetevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonresizeevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonscrollevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonsearchevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonseekedevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonseekingevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonselectevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonstalledevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonstorageevent handler.Getter for theonsubmitevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonsuspendevent handler.org.htmlunit.corejs.javascript.FunctionReturns theontimeupdateevent handler.org.htmlunit.corejs.javascript.FunctionReturns theontoggleevent handler.org.htmlunit.corejs.javascript.FunctionReturns theontransitionendevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonunhandledrejectionevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonunloadevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonvolumechangeevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonwaitingevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonwebkitanimationendevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonwebkitanimationiterationevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonwebkitanimationstartevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonwebkittransitionendevent handler.org.htmlunit.corejs.javascript.FunctionReturns theonwheelevent handler.Returns the value of theopenerproperty.intReturns theouterHeight.intReturns theouterWidth.intReturns the value ofpageXOffsetproperty.intReturns the value ofpageYOffsetproperty.org.htmlunit.corejs.javascript.ScriptableObjectReturns the value of theparentproperty.Returns theperformanceproperty.static intReturns the port of the specified URL.org.htmlunit.corejs.javascript.ScriptablegetPrototype(Class<? extends HtmlUnitScriptable> jsClass) Returns the prototype object corresponding to the specified HtmlUnit class inside the window scope.static WindowProxyReturns the proxy for the specified window.Returns thescreenproperty.intReturns the value ofscrollXproperty.intReturns the value ofscrollYproperty.Returns the current selection.Returns the current selection.getSelf()Returns theselfproperty.Returns thesessionStorageproperty.Returns thespeechSynthesisproperty.Returns the text from the status line.getStorage(StorageHolder.Type storageType) Gets the storage of the specified type.Returns thestyleMediaproperty.getTop()Returns the value of thetopproperty.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.voidInitializes the object.voidinitialize(Page enclosedPage) Initialize the object.voidinitialize(WebWindow webWindow, Page pageToEnclose) Initializes this window.booleanisClosed()Indicates if this window is closed.booleanUsed to allow re-declaration of constants (eg: "var undefined;").static org.htmlunit.corejs.javascript.ScriptablejsConstructor(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 URLmakeUrlForOpenWindow(String urlString) matchMedia(String mediaQueryString) Returns a new MediaQueryList object representing the parsed results of the specified media query string.voidmoveBy(int x, int y) Does nothing.voidmoveTo(int x, int y) Does nothing.Opens a new window.static voidpostMessage(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.voidprint()Prints the current page.The JavaScript functionprompt.voidprivate voidreadObject(ObjectInputStream stream) Restores the transient fields during deserialization.voidreleaseEvents(String type) Does nothing special anymore.intrequestAnimationFrame(Object callback) Add callback to the list of animationFrames.voidresizeBy(int width, int height) Does nothing.voidresizeTo(int width, int height) Does nothing.voidscroll(int x, int y) Scrolls to the specified location on the page.voidscrollBy(int x, int y) Scrolls the window content the specified distance.voidscrollByLines(int lines) Scrolls the window content down by the specified number of lines.voidscrollByPages(int pages) Scrolls the window content down by the specified number of pages.voidscrollTo(int x, int y) Scrolls to the specified location on the page.voidsetClientInformation(Object clientInformation) voidsetControllers(Object value) Sets thecontrollers.voidsetCurrentEvent(Event event) Sets the current event.private voidsetHandlerForJavaScript(String eventName, Object handler) voidsetInnerHeight(int height) Sets theinnerHeight.voidsetInnerWidth(int width) Sets theinnerWidth.static ObjectsetInterval(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.voidsetLocation(String newLocation) Sets thelocationproperty.voidSets the value of the window'snameproperty.voidsetOnabort(Object onabort) Sets theonabortevent handler.voidsetOnafterprint(Object onafterprint) Sets theonafterprintevent handler.voidsetOnanimationend(Object onanimationend) Sets theonanimationendevent handler.voidsetOnanimationiteration(Object onanimationiteration) Sets theonanimationiterationevent handler.voidsetOnanimationstart(Object onanimationstart) Sets theonanimationstartevent handler.voidsetOnauxclick(Object onauxclick) Sets theonauxclickevent handler.voidsetOnbeforeprint(Object onbeforeprint) Sets theonbeforeprintevent handler.voidsetOnbeforeunload(Object onbeforeunload) Sets the value of the window'sonbeforeunloadproperty.voidSets the value of theonblurevent handler.voidsetOncancel(Object oncancel) Sets theoncancelevent handler.voidsetOncanplay(Object oncanplay) Sets theoncanplayevent handler.voidsetOncanplaythrough(Object oncanplaythrough) Sets theoncanplaythroughevent handler.voidsetOnchange(Object onchange) Setter for theonchangeevent handler.voidsetOnclick(Object onclick) Sets the value of theonclickevent handler.voidsetOnclose(Object onclose) Sets theoncloseevent handler.voidsetOncontextmenu(Object oncontextmenu) Sets theoncontextmenuevent handler.voidsetOncuechange(Object oncuechange) Sets theoncuechangeevent handler.voidsetOndblclick(Object ondblclick) Sets the value of theondblclickevent handler.voidsetOndevicemotion(Object ondevicemotion) Sets theondevicemotionevent handler.voidsetOndeviceorientation(Object ondeviceorientation) Sets theondeviceorientationevent handler.voidsetOndeviceorientationabsolute(Object ondeviceorientationabsolute) Sets theondeviceorientationabsoluteevent handler.voidSets theondragevent handler.voidsetOndragend(Object ondragend) Sets theondragendevent handler.voidsetOndragenter(Object ondragenter) Sets theondragenterevent handler.voidsetOndragleave(Object ondragleave) Sets theondragleaveevent handler.voidsetOndragover(Object ondragover) Sets theondragoverevent handler.voidsetOndragstart(Object ondragstart) Sets theondragstartevent handler.voidSets theondropevent handler.voidsetOndurationchange(Object ondurationchange) Sets theondurationchangeevent handler.voidsetOnemptied(Object onemptied) Sets theonemptiedevent handler.voidsetOnended(Object onended) Sets theonendedevent handler.voidsetOnerror(Object onerror) Sets the value of the window'sonerrorproperty.voidsetOnfocus(Object onfocus) Sets theonfocusevent handler.voidsetOngotpointercapture(Object ongotpointercapture) Sets theongotpointercaptureevent handler.voidsetOnhashchange(Object onhashchange) Sets the value of theonhashchangeevent handler.voidsetOninput(Object oninput) Sets theoninputevent handler.voidsetOninvalid(Object oninvalid) Sets theoninvalidevent handler.voidsetOnkeydown(Object onkeydown) Sets theonkeydownevent handler.voidsetOnkeypress(Object onkeypress) Sets theonkeypressevent handler.voidsetOnkeyup(Object onkeyup) Sets theonkeyupevent handler.voidsetOnlanguagechange(Object onlanguagechange) Sets theonlanguagechangeevent handler.voidSets the value of theonloadevent handler.voidsetOnloadeddata(Object onloadeddata) Sets theonloadeddataevent handler.voidsetOnloadedmetadata(Object onloadedmetadata) Sets theonloadedmetadataevent handler.voidsetOnloadstart(Object onloadstart) Sets theonloadstartevent handler.voidsetOnlostpointercapture(Object onlostpointercapture) Sets theonlostpointercaptureevent handler.voidsetOnmessage(Object onmessage) Sets the value of the window'sonmessageproperty.voidsetOnmousedown(Object onmousedown) Sets theonmousedownevent handler.voidsetOnmouseenter(Object onmouseenter) Sets theonmouseenterevent handler.voidsetOnmouseleave(Object onmouseleave) Sets theonmouseleaveevent handler.voidsetOnmousemove(Object onmousemove) Sets theonmousemoveevent handler.voidsetOnmouseout(Object onmouseout) Sets theonmouseoutevent handler.voidsetOnmouseover(Object onmouseover) Sets theonmouseoverevent handler.voidsetOnmouseup(Object onmouseup) Sets theonmouseupevent handler.voidsetOnmousewheel(Object onmousewheel) Sets theonmousewheelevent handler.voidsetOnmozfullscreenchange(Object onmozfullscreenchange) Sets theonmozfullscreenchangeevent handler.voidsetOnmozfullscreenerror(Object onmozfullscreenerror) Sets theonmozfullscreenerrorevent handler.voidsetOnoffline(Object onoffline) Sets theonofflineevent handler.voidsetOnonline(Object ononline) Sets theononlineevent handler.voidsetOnpagehide(Object onpagehide) Sets theonpagehideevent handler.voidsetOnpageshow(Object onpageshow) Sets theonpageshowevent handler.voidsetOnpause(Object onpause) Sets theonpauseevent handler.voidSets theonplayevent handler.voidsetOnplaying(Object onplaying) Sets theonplayingevent handler.voidsetOnpointercancel(Object onpointercancel) Sets theonpointercancelevent handler.voidsetOnpointerdown(Object onpointerdown) Sets theonpointerdownevent handler.voidsetOnpointerenter(Object onpointerenter) Sets theonpointerenterevent handler.voidsetOnpointerleave(Object onpointerleave) Sets theonpointerleaveevent handler.voidsetOnpointermove(Object onpointermove) Sets theonpointermoveevent handler.voidsetOnpointerout(Object onpointerout) Sets theonpointeroutevent handler.voidsetOnpointerover(Object onpointerover) Sets theonpointeroverevent handler.voidsetOnpointerup(Object onpointerup) Sets theonpointerupevent handler.voidsetOnpopstate(Object onpopstate) Sets theonpopstateevent handler.voidsetOnprogress(Object onprogress) Sets theonprogressevent handler.voidsetOnratechange(Object onratechange) Sets theonratechangeevent handler.voidsetOnrejectionhandled(Object onrejectionhandled) Sets theonrejectionhandledevent handler.voidsetOnreset(Object onreset) Sets theonresetevent handler.voidsetOnresize(Object onresize) Sets theonresizeevent handler.voidsetOnscroll(Object onscroll) Sets theonscrollevent handler.voidsetOnsearch(Object onsearch) Sets theonsearchevent handler.voidsetOnseeked(Object onseeked) Sets theonseekedevent handler.voidsetOnseeking(Object onseeking) Sets theonseekingevent handler.voidsetOnselect(Object onselect) Sets theonselectevent handler.voidsetOnstalled(Object onstalled) Sets theonstalledevent handler.voidsetOnstorage(Object onstorage) Sets theonstorageevent handler.voidsetOnsubmit(Object onsubmit) Setter for theonsubmitevent handler.voidsetOnsuspend(Object onsuspend) Sets theonsuspendevent handler.voidsetOntimeupdate(Object ontimeupdate) Sets theontimeupdateevent handler.voidsetOntoggle(Object ontoggle) Sets theontoggleevent handler.voidsetOntransitionend(Object ontransitionend) Sets theontransitionendevent handler.voidsetOnunhandledrejection(Object onunhandledrejection) Sets theonunhandledrejectionevent handler.voidsetOnunload(Object onunload) Sets theonunloadevent handler.voidsetOnvolumechange(Object onvolumechange) Sets theonvolumechangeevent handler.voidsetOnwaiting(Object onwaiting) Sets theonwaitingevent handler.voidsetOnwebkitanimationend(Object onwebkitanimationend) Sets theonwebkitanimationendevent handler.voidsetOnwebkitanimationiteration(Object onwebkitanimationiteration) Sets theonwebkitanimationiterationevent handler.voidsetOnwebkitanimationstart(Object onwebkitanimationstart) Sets theonwebkitanimationstartevent handler.voidsetOnwebkittransitionend(Object onwebkittransitionend) Sets theonwebkittransitionendevent handler.voidsetOnwheel(Object onwheel) Sets theonwheelevent handler.voidSets theopenerproperty.voidsetOuterHeight(int height) Sets theouterHeight.voidsetOuterWidth(int width) Sets theouterWidth.voidsetParentScope(org.htmlunit.corejs.javascript.Scriptable parent) Does nothing.voidsetPrototypes(Map<Class<? extends org.htmlunit.corejs.javascript.Scriptable>, org.htmlunit.corejs.javascript.Scriptable> map) Sets the prototypes for HtmlUnit host classes.voidSets the text from the status line.static ObjectsetTimeout(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.voidSets the value of thetopproperty.voidstop()Should implement the stop() function on the window object.voidTriggers theonerrorhandler, 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, setEventHandlerMethods 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, setupRejectedPromiseMethods 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:
getPrototypein 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:
btoain 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:
atobin 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
nullif 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
nullif no event is currently available
-
getCurrentEvent
Returns the current event (used internally regardless of the emulation mode).- Returns:
- the current event, or
nullif 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
nullif 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 theselfproperty.- Returns:
- this
-
getLocalStorage
Returns thelocalStorageproperty.- Returns:
- the
localStorageproperty
-
getSessionStorage
Returns thesessionStorageproperty.- Returns:
- the
sessionStorageproperty
-
getStorage
Gets the storage of the specified type.- Parameters:
storageType- the type- Returns:
- the storage
-
getLocation
Returns thelocationproperty.- Returns:
- the
locationproperty
-
setLocation
Sets thelocationproperty. 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 thescreenproperty.- Returns:
- the
screenproperty
-
getHistory
Returns thehistoryproperty.- Returns:
- the
historyproperty
-
getExternal
Returns theexternalproperty.- Returns:
- the
externalproperty
-
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 thetopproperty.- Returns:
- the value of
top
-
setTop
Sets the value of thetopproperty.- Parameters:
o- the new value
-
getParent
public org.htmlunit.corejs.javascript.ScriptableObject getParent()Returns the value of theparentproperty.- Returns:
- the value of the
parentproperty
-
getOpener
Returns the value of theopenerproperty.- Returns:
- the value of the
opener, ornullfor a top level window
-
setOpener
Sets theopenerproperty.- Parameters:
newValue- the new value
-
getFrameElement
Returns the (i)frame in which the window is contained.- Returns:
nullfor a top level window
-
getFrames_js
Returns the value of theframesproperty.- Returns:
- the value of the
framesproperty
-
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:
trueif 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 theonloadproperty. Note that this is not necessarily a function if something else has been set.- Returns:
- the
onloadproperty
-
setOnload
Sets the value of theonloadevent handler.- Parameters:
onload- the new handler
-
setOnblur
Sets the value of theonblurevent handler.- Parameters:
onblur- the new handler
-
getOnblur
Returns theonblurproperty (not necessary a function if something else has been set).- Returns:
- the
onblurproperty
-
getOnclick
Returns theonclickproperty (not necessary a function if something else has been set).- Returns:
- the
onclickproperty
-
setOnclick
Sets the value of theonclickevent handler.- Parameters:
onclick- the new handler
-
getOndblclick
Returns theondblclickproperty (not necessary a function if something else has been set).- Returns:
- the
ondblclickproperty
-
setOndblclick
Sets the value of theondblclickevent handler.- Parameters:
ondblclick- the new handler
-
getOnhashchange
Returns theonhashchangeproperty (not necessary a function if something else has been set).- Returns:
- the
onhashchangeproperty
-
setOnhashchange
Sets the value of theonhashchangeevent handler.- Parameters:
onhashchange- the new handler
-
getName
Returns the value of the window'snameproperty.- Returns:
- the value of the window's
nameproperty
-
setName
Sets the value of the window'snameproperty.- Parameters:
name- the value of the window'snameproperty
-
getOnbeforeunload
Returns the value of the window'sonbeforeunloadproperty.- Returns:
- the value of the window's
onbeforeunloadproperty
-
setOnbeforeunload
Sets the value of the window'sonbeforeunloadproperty.- Parameters:
onbeforeunload- the value of the window'sonbeforeunloadproperty
-
getOnerror
Returns the value of the window'sonerrorproperty.- Returns:
- the value of the window's
onerrorproperty
-
setOnerror
Sets the value of the window'sonerrorproperty.- Parameters:
onerror- the value of the window'sonerrorproperty
-
getOnmessage
Returns the value of the window'sonmessageproperty.- Returns:
- the value of the window's
onmessageproperty
-
setOnmessage
Sets the value of the window'sonmessageproperty.- Parameters:
onmessage- the value of the window'sonmessageproperty
-
triggerOnError
Triggers theonerrorhandler, 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:
getin interfaceorg.htmlunit.corejs.javascript.Scriptable- Overrides:
getin 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 thePrintHandlerdefined for theWebClientto 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 ofmozInnerScreenXproperty.- Returns:
- the value of
mozInnerScreenXproperty
-
getMozInnerScreenY
public int getMozInnerScreenY()Returns the value ofmozInnerScreenYproperty.- Returns:
- the value of
mozInnerScreenYproperty
-
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 ofpageXOffsetproperty.- Returns:
- the value of
pageXOffsetproperty
-
getPageYOffset
public int getPageYOffset()Returns the value ofpageYOffsetproperty.- Returns:
- the value of
pageYOffsetproperty
-
getScrollX
public int getScrollX()Returns the value ofscrollXproperty.- Returns:
- the value of
scrollXproperty
-
getScrollY
public int getScrollY()Returns the value ofscrollYproperty.- Returns:
- the value of
scrollYproperty
-
getNetscape
Returns the value ofnetscapeproperty.- Returns:
- the value of
netscapeproperty
-
isConst
Used to allow re-declaration of constants (eg: "var undefined;").- Specified by:
isConstin interfaceorg.htmlunit.corejs.javascript.ConstProperties- Overrides:
isConstin 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:
dispatchEventin classEventTarget- Parameters:
event- the event to be dispatched- Returns:
falseif at least one of the event handlers which handled the event calledpreventDefault;trueotherwise
-
getOnchange
Getter for theonchangeevent handler.- Returns:
- the handler
-
setOnchange
Setter for theonchangeevent handler.- Parameters:
onchange- the handler
-
getOnsubmit
Getter for theonsubmitevent handler.- Returns:
- the handler
-
setOnsubmit
Setter for theonsubmitevent 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 theperformanceproperty.- Returns:
- the
performanceproperty
-
getDevicePixelRatio
public int getDevicePixelRatio()Returns thedevicePixelRatioproperty.- Returns:
- the
devicePixelRatioproperty
-
getStyleMedia
Returns thestyleMediaproperty.- Returns:
- the
styleMediaproperty
-
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 thespeechSynthesisproperty.- Returns:
- the
speechSynthesisproperty
-
getOffscreenBuffering
Returns theoffscreenBufferingproperty.- Returns:
- the
offscreenBufferingproperty
-
getCrypto
Returns thecryptoproperty.- Returns:
- the
cryptoproperty
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
setParentScope
public void setParentScope(org.htmlunit.corejs.javascript.Scriptable parent) Does nothing.- Specified by:
setParentScopein interfaceorg.htmlunit.corejs.javascript.Scriptable- Overrides:
setParentScopein classHtmlUnitScriptable- Parameters:
parent- the new parent scope
-
getOnfocus
public org.htmlunit.corejs.javascript.Function getOnfocus()Returns theonfocusevent handler.- Returns:
- the
onfocusevent handler
-
setOnfocus
Sets theonfocusevent handler.- Parameters:
onfocus- theonfocusevent handler
-
getOndragend
public org.htmlunit.corejs.javascript.Function getOndragend()Returns theondragendevent handler.- Returns:
- the
ondragendevent handler
-
setOndragend
Sets theondragendevent handler.- Parameters:
ondragend- theondragendevent handler
-
getOninvalid
public org.htmlunit.corejs.javascript.Function getOninvalid()Returns theoninvalidevent handler.- Returns:
- the
oninvalidevent handler
-
setOninvalid
Sets theoninvalidevent handler.- Parameters:
oninvalid- theoninvalidevent handler
-
getOnpointerout
public org.htmlunit.corejs.javascript.Function getOnpointerout()Returns theonpointeroutevent handler.- Returns:
- the
onpointeroutevent handler
-
setOnpointerout
Sets theonpointeroutevent handler.- Parameters:
onpointerout- theonpointeroutevent handler
-
getOnratechange
public org.htmlunit.corejs.javascript.Function getOnratechange()Returns theonratechangeevent handler.- Returns:
- the
onratechangeevent handler
-
setOnratechange
Sets theonratechangeevent handler.- Parameters:
onratechange- theonratechangeevent handler
-
getOnanimationiteration
public org.htmlunit.corejs.javascript.Function getOnanimationiteration()Returns theonanimationiterationevent handler.- Returns:
- the
onanimationiterationevent handler
-
setOnanimationiteration
Sets theonanimationiterationevent handler.- Parameters:
onanimationiteration- theonanimationiterationevent handler
-
getOncanplaythrough
public org.htmlunit.corejs.javascript.Function getOncanplaythrough()Returns theoncanplaythroughevent handler.- Returns:
- the
oncanplaythroughevent handler
-
setOncanplaythrough
Sets theoncanplaythroughevent handler.- Parameters:
oncanplaythrough- theoncanplaythroughevent handler
-
getOncancel
public org.htmlunit.corejs.javascript.Function getOncancel()Returns theoncancelevent handler.- Returns:
- the
oncancelevent handler
-
setOncancel
Sets theoncancelevent handler.- Parameters:
oncancel- theoncancelevent handler
-
getOnpointerenter
public org.htmlunit.corejs.javascript.Function getOnpointerenter()Returns theonpointerenterevent handler.- Returns:
- the
onpointerenterevent handler
-
setOnpointerenter
Sets theonpointerenterevent handler.- Parameters:
onpointerenter- theonpointerenterevent handler
-
getOnselect
public org.htmlunit.corejs.javascript.Function getOnselect()Returns theonselectevent handler.- Returns:
- the
onselectevent handler
-
setOnselect
Sets theonselectevent handler.- Parameters:
onselect- theonselectevent handler
-
getOnauxclick
public org.htmlunit.corejs.javascript.Function getOnauxclick()Returns theonauxclickevent handler.- Returns:
- the
onauxclickevent handler
-
setOnauxclick
Sets theonauxclickevent handler.- Parameters:
onauxclick- theonauxclickevent handler
-
getOnscroll
public org.htmlunit.corejs.javascript.Function getOnscroll()Returns theonscrollevent handler.- Returns:
- the
onscrollevent handler
-
setOnscroll
Sets theonscrollevent handler.- Parameters:
onscroll- theonscrollevent handler
-
getOnkeydown
public org.htmlunit.corejs.javascript.Function getOnkeydown()Returns theonkeydownevent handler.- Returns:
- the
onkeydownevent handler
-
setOnkeydown
Sets theonkeydownevent handler.- Parameters:
onkeydown- theonkeydownevent handler
-
getOnwebkitanimationstart
public org.htmlunit.corejs.javascript.Function getOnwebkitanimationstart()Returns theonwebkitanimationstartevent handler.- Returns:
- the
onwebkitanimationstartevent handler
-
setOnwebkitanimationstart
Sets theonwebkitanimationstartevent handler.- Parameters:
onwebkitanimationstart- theonwebkitanimationstartevent handler
-
getOnkeyup
public org.htmlunit.corejs.javascript.Function getOnkeyup()Returns theonkeyupevent handler.- Returns:
- the
onkeyupevent handler
-
setOnkeyup
Sets theonkeyupevent handler.- Parameters:
onkeyup- theonkeyupevent handler
-
getOnreset
public org.htmlunit.corejs.javascript.Function getOnreset()Returns theonresetevent handler.- Returns:
- the
onresetevent handler
-
setOnreset
Sets theonresetevent handler.- Parameters:
onreset- theonresetevent handler
-
getOnkeypress
public org.htmlunit.corejs.javascript.Function getOnkeypress()Returns theonkeypressevent handler.- Returns:
- the
onkeypressevent handler
-
setOnkeypress
Sets theonkeypressevent handler.- Parameters:
onkeypress- theonkeypressevent handler
-
getOndrag
public org.htmlunit.corejs.javascript.Function getOndrag()Returns theondragevent handler.- Returns:
- the
ondragevent handler
-
setOndrag
Sets theondragevent handler.- Parameters:
ondrag- theondragevent handler
-
getOnseeked
public org.htmlunit.corejs.javascript.Function getOnseeked()Returns theonseekedevent handler.- Returns:
- the
onseekedevent handler
-
setOnseeked
Sets theonseekedevent handler.- Parameters:
onseeked- theonseekedevent handler
-
getOnoffline
public org.htmlunit.corejs.javascript.Function getOnoffline()Returns theonofflineevent handler.- Returns:
- the
onofflineevent handler
-
setOnoffline
Sets theonofflineevent handler.- Parameters:
onoffline- theonofflineevent handler
-
getOndeviceorientation
public org.htmlunit.corejs.javascript.Function getOndeviceorientation()Returns theondeviceorientationevent handler.- Returns:
- the
ondeviceorientationevent handler
-
setOndeviceorientation
Sets theondeviceorientationevent handler.- Parameters:
ondeviceorientation- theondeviceorientationevent handler
-
getOntoggle
public org.htmlunit.corejs.javascript.Function getOntoggle()Returns theontoggleevent handler.- Returns:
- the
ontoggleevent handler
-
setOntoggle
Sets theontoggleevent handler.- Parameters:
ontoggle- theontoggleevent handler
-
getOnplay
public org.htmlunit.corejs.javascript.Function getOnplay()Returns theonplayevent handler.- Returns:
- the
onplayevent handler
-
setOnplay
Sets theonplayevent handler.- Parameters:
onplay- theonplayevent handler
-
getOnmousemove
public org.htmlunit.corejs.javascript.Function getOnmousemove()Returns theonmousemoveevent handler.- Returns:
- the
onmousemoveevent handler
-
setOnmousemove
Sets theonmousemoveevent handler.- Parameters:
onmousemove- theonmousemoveevent handler
-
getOnpointermove
public org.htmlunit.corejs.javascript.Function getOnpointermove()Returns theonpointermoveevent handler.- Returns:
- the
onpointermoveevent handler
-
setOnpointermove
Sets theonpointermoveevent handler.- Parameters:
onpointermove- theonpointermoveevent handler
-
getOnmouseover
public org.htmlunit.corejs.javascript.Function getOnmouseover()Returns theonmouseoverevent handler.- Returns:
- the
onmouseoverevent handler
-
setOnmouseover
Sets theonmouseoverevent handler.- Parameters:
onmouseover- theonmouseoverevent handler
-
getOnlostpointercapture
public org.htmlunit.corejs.javascript.Function getOnlostpointercapture()Returns theonlostpointercaptureevent handler.- Returns:
- the
onlostpointercaptureevent handler
-
setOnlostpointercapture
Sets theonlostpointercaptureevent handler.- Parameters:
onlostpointercapture- theonlostpointercaptureevent handler
-
getOnpointerover
public org.htmlunit.corejs.javascript.Function getOnpointerover()Returns theonpointeroverevent handler.- Returns:
- the
onpointeroverevent handler
-
setOnpointerover
Sets theonpointeroverevent handler.- Parameters:
onpointerover- theonpointeroverevent handler
-
getOnclose
public org.htmlunit.corejs.javascript.Function getOnclose()Returns theoncloseevent handler.- Returns:
- the
oncloseevent handler
-
setOnclose
Sets theoncloseevent handler.- Parameters:
onclose- theoncloseevent handler
-
getOnanimationend
public org.htmlunit.corejs.javascript.Function getOnanimationend()Returns theonanimationendevent handler.- Returns:
- the
onanimationendevent handler
-
setOnanimationend
Sets theonanimationendevent handler.- Parameters:
onanimationend- theonanimationendevent handler
-
getOndragenter
public org.htmlunit.corejs.javascript.Function getOndragenter()Returns theondragenterevent handler.- Returns:
- the
ondragenterevent handler
-
setOndragenter
Sets theondragenterevent handler.- Parameters:
ondragenter- theondragenterevent handler
-
getOnafterprint
public org.htmlunit.corejs.javascript.Function getOnafterprint()Returns theonafterprintevent handler.- Returns:
- the
onafterprintevent handler
-
setOnafterprint
Sets theonafterprintevent handler.- Parameters:
onafterprint- theonafterprintevent handler
-
getOnmozfullscreenerror
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenerror()Returns theonmozfullscreenerrorevent handler.- Returns:
- the
onmozfullscreenerrorevent handler
-
setOnmozfullscreenerror
Sets theonmozfullscreenerrorevent handler.- Parameters:
onmozfullscreenerror- theonmozfullscreenerrorevent handler
-
getOnmouseleave
public org.htmlunit.corejs.javascript.Function getOnmouseleave()Returns theonmouseleaveevent handler.- Returns:
- the
onmouseleaveevent handler
-
setOnmouseleave
Sets theonmouseleaveevent handler.- Parameters:
onmouseleave- theonmouseleaveevent handler
-
getOnmousewheel
public org.htmlunit.corejs.javascript.Function getOnmousewheel()Returns theonmousewheelevent handler.- Returns:
- the
onmousewheelevent handler
-
setOnmousewheel
Sets theonmousewheelevent handler.- Parameters:
onmousewheel- theonmousewheelevent handler
-
getOnseeking
public org.htmlunit.corejs.javascript.Function getOnseeking()Returns theonseekingevent handler.- Returns:
- the
onseekingevent handler
-
setOnseeking
Sets theonseekingevent handler.- Parameters:
onseeking- theonseekingevent handler
-
getOncuechange
public org.htmlunit.corejs.javascript.Function getOncuechange()Returns theoncuechangeevent handler.- Returns:
- the
oncuechangeevent handler
-
setOncuechange
Sets theoncuechangeevent handler.- Parameters:
oncuechange- theoncuechangeevent handler
-
getOnpageshow
public org.htmlunit.corejs.javascript.Function getOnpageshow()Returns theonpageshowevent handler.- Returns:
- the
onpageshowevent handler
-
setOnpageshow
Sets theonpageshowevent handler.- Parameters:
onpageshow- theonpageshowevent handler
-
getOnmozfullscreenchange
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenchange()Returns theonmozfullscreenchangeevent handler.- Returns:
- the
onmozfullscreenchangeevent handler
-
setOnmozfullscreenchange
Sets theonmozfullscreenchangeevent handler.- Parameters:
onmozfullscreenchange- theonmozfullscreenchangeevent handler
-
getOndurationchange
public org.htmlunit.corejs.javascript.Function getOndurationchange()Returns theondurationchangeevent handler.- Returns:
- the
ondurationchangeevent handler
-
setOndurationchange
Sets theondurationchangeevent handler.- Parameters:
ondurationchange- theondurationchangeevent handler
-
getOnplaying
public org.htmlunit.corejs.javascript.Function getOnplaying()Returns theonplayingevent handler.- Returns:
- the
onplayingevent handler
-
setOnplaying
Sets theonplayingevent handler.- Parameters:
onplaying- theonplayingevent handler
-
getOnended
public org.htmlunit.corejs.javascript.Function getOnended()Returns theonendedevent handler.- Returns:
- the
onendedevent handler
-
setOnended
Sets theonendedevent handler.- Parameters:
onended- theonendedevent handler
-
getOnloadeddata
public org.htmlunit.corejs.javascript.Function getOnloadeddata()Returns theonloadeddataevent handler.- Returns:
- the
onloadeddataevent handler
-
setOnloadeddata
Sets theonloadeddataevent handler.- Parameters:
onloadeddata- theonloadeddataevent handler
-
getOnunhandledrejection
public org.htmlunit.corejs.javascript.Function getOnunhandledrejection()Returns theonunhandledrejectionevent handler.- Returns:
- the
onunhandledrejectionevent handler
-
setOnunhandledrejection
Sets theonunhandledrejectionevent handler.- Parameters:
onunhandledrejection- theonunhandledrejectionevent handler
-
getOnmouseout
public org.htmlunit.corejs.javascript.Function getOnmouseout()Returns theonmouseoutevent handler.- Returns:
- the
onmouseoutevent handler
-
setOnmouseout
Sets theonmouseoutevent handler.- Parameters:
onmouseout- theonmouseoutevent handler
-
getOnsuspend
public org.htmlunit.corejs.javascript.Function getOnsuspend()Returns theonsuspendevent handler.- Returns:
- the
onsuspendevent handler
-
setOnsuspend
Sets theonsuspendevent handler.- Parameters:
onsuspend- theonsuspendevent handler
-
getOnwaiting
public org.htmlunit.corejs.javascript.Function getOnwaiting()Returns theonwaitingevent handler.- Returns:
- the
onwaitingevent handler
-
setOnwaiting
Sets theonwaitingevent handler.- Parameters:
onwaiting- theonwaitingevent handler
-
getOncanplay
public org.htmlunit.corejs.javascript.Function getOncanplay()Returns theoncanplayevent handler.- Returns:
- the
oncanplayevent handler
-
setOncanplay
Sets theoncanplayevent handler.- Parameters:
oncanplay- theoncanplayevent handler
-
getOnmousedown
public org.htmlunit.corejs.javascript.Function getOnmousedown()Returns theonmousedownevent handler.- Returns:
- the
onmousedownevent handler
-
setOnmousedown
Sets theonmousedownevent handler.- Parameters:
onmousedown- theonmousedownevent handler
-
getOnlanguagechange
public org.htmlunit.corejs.javascript.Function getOnlanguagechange()Returns theonlanguagechangeevent handler.- Returns:
- the
onlanguagechangeevent handler
-
setOnlanguagechange
Sets theonlanguagechangeevent handler.- Parameters:
onlanguagechange- theonlanguagechangeevent handler
-
getOnemptied
public org.htmlunit.corejs.javascript.Function getOnemptied()Returns theonemptiedevent handler.- Returns:
- the
onemptiedevent handler
-
setOnemptied
Sets theonemptiedevent handler.- Parameters:
onemptied- theonemptiedevent handler
-
getOnrejectionhandled
public org.htmlunit.corejs.javascript.Function getOnrejectionhandled()Returns theonrejectionhandledevent handler.- Returns:
- the
onrejectionhandledevent handler
-
setOnrejectionhandled
Sets theonrejectionhandledevent handler.- Parameters:
onrejectionhandled- theonrejectionhandledevent handler
-
getOnpointercancel
public org.htmlunit.corejs.javascript.Function getOnpointercancel()Returns theonpointercancelevent handler.- Returns:
- the
onpointercancelevent handler
-
setOnpointercancel
Sets theonpointercancelevent handler.- Parameters:
onpointercancel- theonpointercancelevent handler
-
getOnresize
public org.htmlunit.corejs.javascript.Function getOnresize()Returns theonresizeevent handler.- Returns:
- the
onresizeevent handler
-
setOnresize
Sets theonresizeevent handler.- Parameters:
onresize- theonresizeevent handler
-
getOnpause
public org.htmlunit.corejs.javascript.Function getOnpause()Returns theonpauseevent handler.- Returns:
- the
onpauseevent handler
-
setOnpause
Sets theonpauseevent handler.- Parameters:
onpause- theonpauseevent handler
-
getOnloadstart
public org.htmlunit.corejs.javascript.Function getOnloadstart()Returns theonloadstartevent handler.- Returns:
- the
onloadstartevent handler
-
setOnloadstart
Sets theonloadstartevent handler.- Parameters:
onloadstart- theonloadstartevent handler
-
getOnprogress
public org.htmlunit.corejs.javascript.Function getOnprogress()Returns theonprogressevent handler.- Returns:
- the
onprogressevent handler
-
setOnprogress
Sets theonprogressevent handler.- Parameters:
onprogress- theonprogressevent handler
-
getOnpointerup
public org.htmlunit.corejs.javascript.Function getOnpointerup()Returns theonpointerupevent handler.- Returns:
- the
onpointerupevent handler
-
setOnpointerup
Sets theonpointerupevent handler.- Parameters:
onpointerup- theonpointerupevent handler
-
getOnwheel
public org.htmlunit.corejs.javascript.Function getOnwheel()Returns theonwheelevent handler.- Returns:
- the
onwheelevent handler
-
setOnwheel
Sets theonwheelevent handler.- Parameters:
onwheel- theonwheelevent handler
-
getOnpointerleave
public org.htmlunit.corejs.javascript.Function getOnpointerleave()Returns theonpointerleaveevent handler.- Returns:
- the
onpointerleaveevent handler
-
setOnpointerleave
Sets theonpointerleaveevent handler.- Parameters:
onpointerleave- theonpointerleaveevent handler
-
getOnbeforeprint
public org.htmlunit.corejs.javascript.Function getOnbeforeprint()Returns theonbeforeprintevent handler.- Returns:
- the
onbeforeprintevent handler
-
setOnbeforeprint
Sets theonbeforeprintevent handler.- Parameters:
onbeforeprint- theonbeforeprintevent handler
-
getOnstorage
public org.htmlunit.corejs.javascript.Function getOnstorage()Returns theonstorageevent handler.- Returns:
- the
onstorageevent handler
-
setOnstorage
Sets theonstorageevent handler.- Parameters:
onstorage- theonstorageevent handler
-
getOnanimationstart
public org.htmlunit.corejs.javascript.Function getOnanimationstart()Returns theonanimationstartevent handler.- Returns:
- the
onanimationstartevent handler
-
setOnanimationstart
Sets theonanimationstartevent handler.- Parameters:
onanimationstart- theonanimationstartevent handler
-
getOntimeupdate
public org.htmlunit.corejs.javascript.Function getOntimeupdate()Returns theontimeupdateevent handler.- Returns:
- the
ontimeupdateevent handler
-
setOntimeupdate
Sets theontimeupdateevent handler.- Parameters:
ontimeupdate- theontimeupdateevent handler
-
getOnpagehide
public org.htmlunit.corejs.javascript.Function getOnpagehide()Returns theonpagehideevent handler.- Returns:
- the
onpagehideevent handler
-
setOnpagehide
Sets theonpagehideevent handler.- Parameters:
onpagehide- theonpagehideevent handler
-
getOnwebkitanimationiteration
public org.htmlunit.corejs.javascript.Function getOnwebkitanimationiteration()Returns theonwebkitanimationiterationevent handler.- Returns:
- the
onwebkitanimationiterationevent handler
-
setOnwebkitanimationiteration
Sets theonwebkitanimationiterationevent handler.- Parameters:
onwebkitanimationiteration- theonwebkitanimationiterationevent handler
-
getOnabort
public org.htmlunit.corejs.javascript.Function getOnabort()Returns theonabortevent handler.- Returns:
- the
onabortevent handler
-
setOnabort
Sets theonabortevent handler.- Parameters:
onabort- theonabortevent handler
-
getOnloadedmetadata
public org.htmlunit.corejs.javascript.Function getOnloadedmetadata()Returns theonloadedmetadataevent handler.- Returns:
- the
onloadedmetadataevent handler
-
setOnloadedmetadata
Sets theonloadedmetadataevent handler.- Parameters:
onloadedmetadata- theonloadedmetadataevent handler
-
getOnmouseup
public org.htmlunit.corejs.javascript.Function getOnmouseup()Returns theonmouseupevent handler.- Returns:
- the
onmouseupevent handler
-
setOnmouseup
Sets theonmouseupevent handler.- Parameters:
onmouseup- theonmouseupevent handler
-
getOndragover
public org.htmlunit.corejs.javascript.Function getOndragover()Returns theondragoverevent handler.- Returns:
- the
ondragoverevent handler
-
setOndragover
Sets theondragoverevent handler.- Parameters:
ondragover- theondragoverevent handler
-
getOnonline
public org.htmlunit.corejs.javascript.Function getOnonline()Returns theononlineevent handler.- Returns:
- the
ononlineevent handler
-
setOnonline
Sets theononlineevent handler.- Parameters:
ononline- theononlineevent handler
-
getOnsearch
public org.htmlunit.corejs.javascript.Function getOnsearch()Returns theonsearchevent handler.- Returns:
- the
onsearchevent handler
-
setOnsearch
Sets theonsearchevent handler.- Parameters:
onsearch- theonsearchevent handler
-
getOninput
public org.htmlunit.corejs.javascript.Function getOninput()Returns theoninputevent handler.- Returns:
- the
oninputevent handler
-
setOninput
Sets theoninputevent handler.- Parameters:
oninput- theoninputevent handler
-
getOnwebkittransitionend
public org.htmlunit.corejs.javascript.Function getOnwebkittransitionend()Returns theonwebkittransitionendevent handler.- Returns:
- the
onwebkittransitionendevent handler
-
setOnwebkittransitionend
Sets theonwebkittransitionendevent handler.- Parameters:
onwebkittransitionend- theonwebkittransitionendevent handler
-
getOndevicemotion
public org.htmlunit.corejs.javascript.Function getOndevicemotion()Returns theondevicemotionevent handler.- Returns:
- the
ondevicemotionevent handler
-
setOndevicemotion
Sets theondevicemotionevent handler.- Parameters:
ondevicemotion- theondevicemotionevent handler
-
getOnstalled
public org.htmlunit.corejs.javascript.Function getOnstalled()Returns theonstalledevent handler.- Returns:
- the
onstalledevent handler
-
setOnstalled
Sets theonstalledevent handler.- Parameters:
onstalled- theonstalledevent handler
-
getOnmouseenter
public org.htmlunit.corejs.javascript.Function getOnmouseenter()Returns theonmouseenterevent handler.- Returns:
- the
onmouseenterevent handler
-
setOnmouseenter
Sets theonmouseenterevent handler.- Parameters:
onmouseenter- theonmouseenterevent handler
-
getOndragleave
public org.htmlunit.corejs.javascript.Function getOndragleave()Returns theondragleaveevent handler.- Returns:
- the
ondragleaveevent handler
-
setOndragleave
Sets theondragleaveevent handler.- Parameters:
ondragleave- theondragleaveevent handler
-
getOnpointerdown
public org.htmlunit.corejs.javascript.Function getOnpointerdown()Returns theonpointerdownevent handler.- Returns:
- the
onpointerdownevent handler
-
setOnpointerdown
Sets theonpointerdownevent handler.- Parameters:
onpointerdown- theonpointerdownevent handler
-
getOndrop
public org.htmlunit.corejs.javascript.Function getOndrop()Returns theondropevent handler.- Returns:
- the
ondropevent handler
-
setOndrop
Sets theondropevent handler.- Parameters:
ondrop- theondropevent handler
-
getOnunload
public org.htmlunit.corejs.javascript.Function getOnunload()Returns theonunloadevent handler.- Returns:
- the
onunloadevent handler
-
setOnunload
Sets theonunloadevent handler.- Parameters:
onunload- theonunloadevent handler
-
getOnwebkitanimationend
public org.htmlunit.corejs.javascript.Function getOnwebkitanimationend()Returns theonwebkitanimationendevent handler.- Returns:
- the
onwebkitanimationendevent handler
-
setOnwebkitanimationend
Sets theonwebkitanimationendevent handler.- Parameters:
onwebkitanimationend- theonwebkitanimationendevent handler
-
getOndragstart
public org.htmlunit.corejs.javascript.Function getOndragstart()Returns theondragstartevent handler.- Returns:
- the
ondragstartevent handler
-
setOndragstart
Sets theondragstartevent handler.- Parameters:
ondragstart- theondragstartevent handler
-
getOntransitionend
public org.htmlunit.corejs.javascript.Function getOntransitionend()Returns theontransitionendevent handler.- Returns:
- the
ontransitionendevent handler
-
setOntransitionend
Sets theontransitionendevent handler.- Parameters:
ontransitionend- theontransitionendevent handler
-
getOndeviceorientationabsolute
public org.htmlunit.corejs.javascript.Function getOndeviceorientationabsolute()Returns theondeviceorientationabsoluteevent handler.- Returns:
- the
ondeviceorientationabsoluteevent handler
-
setOndeviceorientationabsolute
Sets theondeviceorientationabsoluteevent handler.- Parameters:
ondeviceorientationabsolute- theondeviceorientationabsoluteevent handler
-
getOnvolumechange
public org.htmlunit.corejs.javascript.Function getOnvolumechange()Returns theonvolumechangeevent handler.- Returns:
- the
onvolumechangeevent handler
-
setOnvolumechange
Sets theonvolumechangeevent handler.- Parameters:
onvolumechange- theonvolumechangeevent handler
-
getOngotpointercapture
public org.htmlunit.corejs.javascript.Function getOngotpointercapture()Returns theongotpointercaptureevent handler.- Returns:
- the
ongotpointercaptureevent handler
-
setOngotpointercapture
Sets theongotpointercaptureevent handler.- Parameters:
ongotpointercapture- theongotpointercaptureevent handler
-
getOnpopstate
public org.htmlunit.corejs.javascript.Function getOnpopstate()Returns theonpopstateevent handler.- Returns:
- the
onpopstateevent handler
-
setOnpopstate
Sets theonpopstateevent handler.- Parameters:
onpopstate- theonpopstateevent handler
-
getBrowserVersion
Gets the browser version currently used. optimized version- Overrides:
getBrowserVersionin classHtmlUnitScriptable- Returns:
- the browser version
-
put
Description copied from class:HtmlUnitScriptable- Specified by:
putin interfaceorg.htmlunit.corejs.javascript.Scriptable- Overrides:
putin classHtmlUnitScriptable
-
getIsSecureContext
- Returns:
- a boolean indicating whether the current context is secure (true) or not (false).
-