Package org.htmlunit.javascript.host
Class Window
- java.lang.Object
-
- org.htmlunit.corejs.javascript.ScriptableObject
-
- org.htmlunit.javascript.HtmlUnitScriptable
-
- org.htmlunit.javascript.host.event.EventTarget
-
- org.htmlunit.javascript.host.Window
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.AutoCloseable,java.lang.Cloneable,org.htmlunit.corejs.javascript.ConstProperties,org.htmlunit.corejs.javascript.debug.DebuggableObject,org.htmlunit.corejs.javascript.Scriptable,org.htmlunit.corejs.javascript.SymbolScriptable,WindowOrWorkerGlobalScope
public class Window extends EventTarget implements WindowOrWorkerGlobalScope, java.lang.AutoCloseable
A JavaScript object forWindow.- See Also:
- MSDN documentation, Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classWindow.AnimationFrameprivate static classWindow.Filter
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Window.AnimationFrame>animationFrames_private java.lang.ObjectclientInformation_private java.lang.Objectcontrollers_private Cryptocrypto_private EventcurrentEvent_private Documentdocument_private DocumentProxydocumentProxy_private Historyhistory_private Locationlocation_private static org.apache.commons.logging.LogLOGprivate Navigatornavigator_private java.lang.Objectopener_static intPERSISTENTTo be documented.private java.util.Map<java.lang.Class<? extends org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable>prototypes_private Screenscreen_private Selectionselection_private java.lang.Stringstatus_private java.util.EnumMap<StorageHolder.Type,Storage>storages_static intTEMPORARYTo be documented.private java.lang.Objecttop_private WebWindowwebWindow_private WindowProxywindowProxy_
-
Constructor Summary
Constructors Constructor Description Window()Creates an instance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidalert(java.lang.Object message)The JavaScript functionalert().intanimateAnimationsFrames()Invokes all the animation callbacks registered for this window by callingrequestAnimationFrame(Object)once.java.lang.Stringatob(java.lang.String encodedData)Decodes a string of data which has been encoded using base-64 encoding.voidblur()Removes focus from this element.java.lang.Stringbtoa(java.lang.String stringToEncode)Creates a base-64 encoded ASCII string from a string of binary data.voidcancelAnimationFrame(java.lang.Object requestId)Remove the callback from the list of animationFrames.voidcaptureEvents(java.lang.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.booleanconfirm(java.lang.String message)The JavaScript functionconfirm.booleandispatchEvent(Event event)Dispatches an event into the event system (standards-conformant browsers only).voiddump(java.lang.String message)Logs messages to the browser's standard output (stdout).booleanfind(java.lang.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.java.lang.Objectget(int index, org.htmlunit.corejs.javascript.Scriptable start)BrowserVersiongetBrowserVersion()Gets the browser version currently used.java.lang.ObjectgetClientInformation()Returns the JavaScript propertyclientInformation.ComputedCSSStyleDeclarationgetComputedStyle(java.lang.Object element, java.lang.String pseudoElement)Returns computed style of the element.java.lang.ObjectgetControllers()Gets thecontrollers.CryptogetCrypto()Returns thecryptoproperty.EventgetCurrentEvent()Returns the current event (used internally regardless of the emulation mode).intgetDevicePixelRatio()Returns thedevicePixelRatioproperty.DocumentgetDocument()Returns the window's current document.DocumentProxygetDocument_js()Returns the JavaScript propertydocument.private java.lang.ObjectgetElementsByName(HtmlPage page, java.lang.String name)java.lang.ObjectgetEvent()Returns the current event.ExternalgetExternal()Returns theexternalproperty.HtmlUnitScriptablegetFrameElement()Returns the (i)frame in which the window is contained.private HTMLCollectiongetFrames()Returns the live collection of frames contained by this window.WindowgetFrames_js()Returns the value of theframesproperty.private static java.lang.ObjectgetFrameWindowByName(HtmlPage page, java.lang.String name)HistorygetHistory()Returns thehistoryproperty.intgetInnerHeight()Returns theinnerHeight.intgetInnerWidth()Returns theinnerWidth.java.lang.ObjectgetIsSecureContext()intgetLength()Returns the number of frames contained by this window.StoragegetLocalStorage()Returns thelocalStorageproperty.LocationgetLocation()Returns thelocationproperty.intgetMozInnerScreenX()Returns the value ofmozInnerScreenXproperty.intgetMozInnerScreenY()Returns the value ofmozInnerScreenYproperty.java.lang.StringgetName()Returns the value of the window'snameproperty.NavigatorgetNavigator()Returns the JavaScript propertynavigator.NetscapegetNetscape()Returns the value ofnetscapeproperty.java.lang.ObjectgetOffscreenBuffering()Returns theoffscreenBufferingproperty.org.htmlunit.corejs.javascript.FunctiongetOnabort()Returns theonabortevent handler.org.htmlunit.corejs.javascript.FunctiongetOnafterprint()Returns theonafterprintevent handler.org.htmlunit.corejs.javascript.FunctiongetOnanimationend()Returns theonanimationendevent handler.org.htmlunit.corejs.javascript.FunctiongetOnanimationiteration()Returns theonanimationiterationevent handler.org.htmlunit.corejs.javascript.FunctiongetOnanimationstart()Returns theonanimationstartevent handler.org.htmlunit.corejs.javascript.FunctiongetOnauxclick()Returns theonauxclickevent handler.org.htmlunit.corejs.javascript.FunctiongetOnbeforeprint()Returns theonbeforeprintevent handler.java.lang.ObjectgetOnbeforeunload()Returns the value of the window'sonbeforeunloadproperty.java.lang.ObjectgetOnblur()Returns theonblurproperty (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.FunctiongetOncancel()Returns theoncancelevent handler.org.htmlunit.corejs.javascript.FunctiongetOncanplay()Returns theoncanplayevent handler.org.htmlunit.corejs.javascript.FunctiongetOncanplaythrough()Returns theoncanplaythroughevent handler.java.lang.ObjectgetOnchange()Getter for theonchangeevent handler.java.lang.ObjectgetOnclick()Returns theonclickproperty (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.FunctiongetOnclose()Returns theoncloseevent handler.org.htmlunit.corejs.javascript.FunctiongetOncontextmenu()Returns theoncontextmenuevent handler.org.htmlunit.corejs.javascript.FunctiongetOncuechange()Returns theoncuechangeevent handler.java.lang.ObjectgetOndblclick()Returns theondblclickproperty (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.FunctiongetOndevicemotion()Returns theondevicemotionevent handler.org.htmlunit.corejs.javascript.FunctiongetOndeviceorientation()Returns theondeviceorientationevent handler.org.htmlunit.corejs.javascript.FunctiongetOndeviceorientationabsolute()Returns theondeviceorientationabsoluteevent handler.org.htmlunit.corejs.javascript.FunctiongetOndrag()Returns theondragevent handler.org.htmlunit.corejs.javascript.FunctiongetOndragend()Returns theondragendevent handler.org.htmlunit.corejs.javascript.FunctiongetOndragenter()Returns theondragenterevent handler.org.htmlunit.corejs.javascript.FunctiongetOndragleave()Returns theondragleaveevent handler.org.htmlunit.corejs.javascript.FunctiongetOndragover()Returns theondragoverevent handler.org.htmlunit.corejs.javascript.FunctiongetOndragstart()Returns theondragstartevent handler.org.htmlunit.corejs.javascript.FunctiongetOndrop()Returns theondropevent handler.org.htmlunit.corejs.javascript.FunctiongetOndurationchange()Returns theondurationchangeevent handler.org.htmlunit.corejs.javascript.FunctiongetOnemptied()Returns theonemptiedevent handler.org.htmlunit.corejs.javascript.FunctiongetOnended()Returns theonendedevent handler.java.lang.ObjectgetOnerror()Returns the value of the window'sonerrorproperty.org.htmlunit.corejs.javascript.FunctiongetOnfocus()Returns theonfocusevent handler.org.htmlunit.corejs.javascript.FunctiongetOngotpointercapture()Returns theongotpointercaptureevent handler.java.lang.ObjectgetOnhashchange()Returns theonhashchangeproperty (not necessary a function if something else has been set).org.htmlunit.corejs.javascript.FunctiongetOninput()Returns theoninputevent handler.org.htmlunit.corejs.javascript.FunctiongetOninvalid()Returns theoninvalidevent handler.org.htmlunit.corejs.javascript.FunctiongetOnkeydown()Returns theonkeydownevent handler.org.htmlunit.corejs.javascript.FunctiongetOnkeypress()Returns theonkeypressevent handler.org.htmlunit.corejs.javascript.FunctiongetOnkeyup()Returns theonkeyupevent handler.org.htmlunit.corejs.javascript.FunctiongetOnlanguagechange()Returns theonlanguagechangeevent handler.java.lang.ObjectgetOnload()Returns theonloadproperty.org.htmlunit.corejs.javascript.FunctiongetOnloadeddata()Returns theonloadeddataevent handler.org.htmlunit.corejs.javascript.FunctiongetOnloadedmetadata()Returns theonloadedmetadataevent handler.org.htmlunit.corejs.javascript.FunctiongetOnloadstart()Returns theonloadstartevent handler.org.htmlunit.corejs.javascript.FunctiongetOnlostpointercapture()Returns theonlostpointercaptureevent handler.java.lang.ObjectgetOnmessage()Returns the value of the window'sonmessageproperty.org.htmlunit.corejs.javascript.FunctiongetOnmousedown()Returns theonmousedownevent handler.org.htmlunit.corejs.javascript.FunctiongetOnmouseenter()Returns theonmouseenterevent handler.org.htmlunit.corejs.javascript.FunctiongetOnmouseleave()Returns theonmouseleaveevent handler.org.htmlunit.corejs.javascript.FunctiongetOnmousemove()Returns theonmousemoveevent handler.org.htmlunit.corejs.javascript.FunctiongetOnmouseout()Returns theonmouseoutevent handler.org.htmlunit.corejs.javascript.FunctiongetOnmouseover()Returns theonmouseoverevent handler.org.htmlunit.corejs.javascript.FunctiongetOnmouseup()Returns theonmouseupevent handler.org.htmlunit.corejs.javascript.FunctiongetOnmousewheel()Returns theonmousewheelevent handler.org.htmlunit.corejs.javascript.FunctiongetOnmozfullscreenchange()Returns theonmozfullscreenchangeevent handler.org.htmlunit.corejs.javascript.FunctiongetOnmozfullscreenerror()Returns theonmozfullscreenerrorevent handler.org.htmlunit.corejs.javascript.FunctiongetOnoffline()Returns theonofflineevent handler.org.htmlunit.corejs.javascript.FunctiongetOnonline()Returns theononlineevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpagehide()Returns theonpagehideevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpageshow()Returns theonpageshowevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpause()Returns theonpauseevent handler.org.htmlunit.corejs.javascript.FunctiongetOnplay()Returns theonplayevent handler.org.htmlunit.corejs.javascript.FunctiongetOnplaying()Returns theonplayingevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpointercancel()Returns theonpointercancelevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpointerdown()Returns theonpointerdownevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpointerenter()Returns theonpointerenterevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpointerleave()Returns theonpointerleaveevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpointermove()Returns theonpointermoveevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpointerout()Returns theonpointeroutevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpointerover()Returns theonpointeroverevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpointerup()Returns theonpointerupevent handler.org.htmlunit.corejs.javascript.FunctiongetOnpopstate()Returns theonpopstateevent handler.org.htmlunit.corejs.javascript.FunctiongetOnprogress()Returns theonprogressevent handler.org.htmlunit.corejs.javascript.FunctiongetOnratechange()Returns theonratechangeevent handler.org.htmlunit.corejs.javascript.FunctiongetOnrejectionhandled()Returns theonrejectionhandledevent handler.org.htmlunit.corejs.javascript.FunctiongetOnreset()Returns theonresetevent handler.org.htmlunit.corejs.javascript.FunctiongetOnresize()Returns theonresizeevent handler.org.htmlunit.corejs.javascript.FunctiongetOnscroll()Returns theonscrollevent handler.org.htmlunit.corejs.javascript.FunctiongetOnsearch()Returns theonsearchevent handler.org.htmlunit.corejs.javascript.FunctiongetOnseeked()Returns theonseekedevent handler.org.htmlunit.corejs.javascript.FunctiongetOnseeking()Returns theonseekingevent handler.org.htmlunit.corejs.javascript.FunctiongetOnselect()Returns theonselectevent handler.org.htmlunit.corejs.javascript.FunctiongetOnstalled()Returns theonstalledevent handler.org.htmlunit.corejs.javascript.FunctiongetOnstorage()Returns theonstorageevent handler.java.lang.ObjectgetOnsubmit()Getter for theonsubmitevent handler.org.htmlunit.corejs.javascript.FunctiongetOnsuspend()Returns theonsuspendevent handler.org.htmlunit.corejs.javascript.FunctiongetOntimeupdate()Returns theontimeupdateevent handler.org.htmlunit.corejs.javascript.FunctiongetOntoggle()Returns theontoggleevent handler.org.htmlunit.corejs.javascript.FunctiongetOntransitionend()Returns theontransitionendevent handler.org.htmlunit.corejs.javascript.FunctiongetOnunhandledrejection()Returns theonunhandledrejectionevent handler.org.htmlunit.corejs.javascript.FunctiongetOnunload()Returns theonunloadevent handler.org.htmlunit.corejs.javascript.FunctiongetOnvolumechange()Returns theonvolumechangeevent handler.org.htmlunit.corejs.javascript.FunctiongetOnwaiting()Returns theonwaitingevent handler.org.htmlunit.corejs.javascript.FunctiongetOnwebkitanimationend()Returns theonwebkitanimationendevent handler.org.htmlunit.corejs.javascript.FunctiongetOnwebkitanimationiteration()Returns theonwebkitanimationiterationevent handler.org.htmlunit.corejs.javascript.FunctiongetOnwebkitanimationstart()Returns theonwebkitanimationstartevent handler.org.htmlunit.corejs.javascript.FunctiongetOnwebkittransitionend()Returns theonwebkittransitionendevent handler.org.htmlunit.corejs.javascript.FunctiongetOnwheel()Returns theonwheelevent handler.java.lang.ObjectgetOpener()Returns the value of theopenerproperty.intgetOuterHeight()Returns theouterHeight.intgetOuterWidth()Returns theouterWidth.intgetPageXOffset()Returns the value ofpageXOffsetproperty.intgetPageYOffset()Returns the value ofpageYOffsetproperty.org.htmlunit.corejs.javascript.ScriptableObjectgetParent()Returns the value of theparentproperty.PerformancegetPerformance()Returns theperformanceproperty.static intgetPort(java.net.URL url)Returns the port of the specified URL.org.htmlunit.corejs.javascript.ScriptablegetPrototype(java.lang.Class<? extends HtmlUnitScriptable> jsClass)Returns the prototype object corresponding to the specified HtmlUnit class inside the window scope.static WindowProxygetProxy(WebWindow w)Returns the proxy for the specified window.ScreengetScreen()Returns thescreenproperty.intgetScrollX()Returns the value ofscrollXproperty.intgetScrollY()Returns the value ofscrollYproperty.SelectiongetSelection()Returns the current selection.SelectiongetSelectionImpl()Returns the current selection.WindowgetSelf()Returns theselfproperty.StoragegetSessionStorage()Returns thesessionStorageproperty.SpeechSynthesisgetSpeechSynthesis()Returns thespeechSynthesisproperty.java.lang.StringgetStatus()Returns the text from the status line.StoragegetStorage(StorageHolder.Type storageType)Gets the storage of the specified type.StyleMediagetStyleMedia()Returns thestyleMediaproperty.java.lang.ObjectgetTop()Returns the value of thetopproperty.WebWindowgetWebWindow()Returns the WebWindow associated with this Window.WindowgetWindow_js()Returns the window property.java.lang.ObjectgetWithFallback(java.lang.String name)To be called when the property detection fails in normal scenarios.voidinitialize()Initializes the object.voidinitialize(Page enclosedPage)Initialize the object.voidinitialize(WebWindow webWindow, Page pageToEnclose)Initializes this window.booleanisClosed()Indicates if this window is closed.booleanisConst(java.lang.String name)Used 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, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function ctorObj, boolean inNewExpr)Creates an instance.private java.net.URLmakeUrlForOpenWindow(java.lang.String urlString)MediaQueryListmatchMedia(java.lang.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.WindowProxyopen(java.lang.Object url, java.lang.Object name, java.lang.Object features, java.lang.Object replace)Opens a new window.static voidpostMessage(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function funObj)Posts a message.voidprint()Prints the current page.java.lang.Stringprompt(java.lang.String message, java.lang.Object defaultValue)The JavaScript functionprompt.voidput(java.lang.String name, org.htmlunit.corejs.javascript.Scriptable start, java.lang.Object value)private voidreadObject(java.io.ObjectInputStream stream)Restores the transient fields during deserialization.voidreleaseEvents(java.lang.String type)Does nothing special anymore.intrequestAnimationFrame(java.lang.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(java.lang.Object clientInformation)voidsetControllers(java.lang.Object value)Sets thecontrollers.voidsetCurrentEvent(Event event)Sets the current event.private voidsetHandlerForJavaScript(java.lang.String eventName, java.lang.Object handler)voidsetInnerHeight(int height)Sets theinnerHeight.voidsetInnerWidth(int width)Sets theinnerWidth.static java.lang.ObjectsetInterval(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function function)Sets a chunk of JavaScript to be invoked each time a specified number of milliseconds has elapsed.voidsetLocation(java.lang.String newLocation)Sets thelocationproperty.voidsetName(java.lang.String name)Sets the value of the window'snameproperty.voidsetOnabort(java.lang.Object onabort)Sets theonabortevent handler.voidsetOnafterprint(java.lang.Object onafterprint)Sets theonafterprintevent handler.voidsetOnanimationend(java.lang.Object onanimationend)Sets theonanimationendevent handler.voidsetOnanimationiteration(java.lang.Object onanimationiteration)Sets theonanimationiterationevent handler.voidsetOnanimationstart(java.lang.Object onanimationstart)Sets theonanimationstartevent handler.voidsetOnauxclick(java.lang.Object onauxclick)Sets theonauxclickevent handler.voidsetOnbeforeprint(java.lang.Object onbeforeprint)Sets theonbeforeprintevent handler.voidsetOnbeforeunload(java.lang.Object onbeforeunload)Sets the value of the window'sonbeforeunloadproperty.voidsetOnblur(java.lang.Object onblur)Sets the value of theonblurevent handler.voidsetOncancel(java.lang.Object oncancel)Sets theoncancelevent handler.voidsetOncanplay(java.lang.Object oncanplay)Sets theoncanplayevent handler.voidsetOncanplaythrough(java.lang.Object oncanplaythrough)Sets theoncanplaythroughevent handler.voidsetOnchange(java.lang.Object onchange)Setter for theonchangeevent handler.voidsetOnclick(java.lang.Object onclick)Sets the value of theonclickevent handler.voidsetOnclose(java.lang.Object onclose)Sets theoncloseevent handler.voidsetOncontextmenu(java.lang.Object oncontextmenu)Sets theoncontextmenuevent handler.voidsetOncuechange(java.lang.Object oncuechange)Sets theoncuechangeevent handler.voidsetOndblclick(java.lang.Object ondblclick)Sets the value of theondblclickevent handler.voidsetOndevicemotion(java.lang.Object ondevicemotion)Sets theondevicemotionevent handler.voidsetOndeviceorientation(java.lang.Object ondeviceorientation)Sets theondeviceorientationevent handler.voidsetOndeviceorientationabsolute(java.lang.Object ondeviceorientationabsolute)Sets theondeviceorientationabsoluteevent handler.voidsetOndrag(java.lang.Object ondrag)Sets theondragevent handler.voidsetOndragend(java.lang.Object ondragend)Sets theondragendevent handler.voidsetOndragenter(java.lang.Object ondragenter)Sets theondragenterevent handler.voidsetOndragleave(java.lang.Object ondragleave)Sets theondragleaveevent handler.voidsetOndragover(java.lang.Object ondragover)Sets theondragoverevent handler.voidsetOndragstart(java.lang.Object ondragstart)Sets theondragstartevent handler.voidsetOndrop(java.lang.Object ondrop)Sets theondropevent handler.voidsetOndurationchange(java.lang.Object ondurationchange)Sets theondurationchangeevent handler.voidsetOnemptied(java.lang.Object onemptied)Sets theonemptiedevent handler.voidsetOnended(java.lang.Object onended)Sets theonendedevent handler.voidsetOnerror(java.lang.Object onerror)Sets the value of the window'sonerrorproperty.voidsetOnfocus(java.lang.Object onfocus)Sets theonfocusevent handler.voidsetOngotpointercapture(java.lang.Object ongotpointercapture)Sets theongotpointercaptureevent handler.voidsetOnhashchange(java.lang.Object onhashchange)Sets the value of theonhashchangeevent handler.voidsetOninput(java.lang.Object oninput)Sets theoninputevent handler.voidsetOninvalid(java.lang.Object oninvalid)Sets theoninvalidevent handler.voidsetOnkeydown(java.lang.Object onkeydown)Sets theonkeydownevent handler.voidsetOnkeypress(java.lang.Object onkeypress)Sets theonkeypressevent handler.voidsetOnkeyup(java.lang.Object onkeyup)Sets theonkeyupevent handler.voidsetOnlanguagechange(java.lang.Object onlanguagechange)Sets theonlanguagechangeevent handler.voidsetOnload(java.lang.Object onload)Sets the value of theonloadevent handler.voidsetOnloadeddata(java.lang.Object onloadeddata)Sets theonloadeddataevent handler.voidsetOnloadedmetadata(java.lang.Object onloadedmetadata)Sets theonloadedmetadataevent handler.voidsetOnloadstart(java.lang.Object onloadstart)Sets theonloadstartevent handler.voidsetOnlostpointercapture(java.lang.Object onlostpointercapture)Sets theonlostpointercaptureevent handler.voidsetOnmessage(java.lang.Object onmessage)Sets the value of the window'sonmessageproperty.voidsetOnmousedown(java.lang.Object onmousedown)Sets theonmousedownevent handler.voidsetOnmouseenter(java.lang.Object onmouseenter)Sets theonmouseenterevent handler.voidsetOnmouseleave(java.lang.Object onmouseleave)Sets theonmouseleaveevent handler.voidsetOnmousemove(java.lang.Object onmousemove)Sets theonmousemoveevent handler.voidsetOnmouseout(java.lang.Object onmouseout)Sets theonmouseoutevent handler.voidsetOnmouseover(java.lang.Object onmouseover)Sets theonmouseoverevent handler.voidsetOnmouseup(java.lang.Object onmouseup)Sets theonmouseupevent handler.voidsetOnmousewheel(java.lang.Object onmousewheel)Sets theonmousewheelevent handler.voidsetOnmozfullscreenchange(java.lang.Object onmozfullscreenchange)Sets theonmozfullscreenchangeevent handler.voidsetOnmozfullscreenerror(java.lang.Object onmozfullscreenerror)Sets theonmozfullscreenerrorevent handler.voidsetOnoffline(java.lang.Object onoffline)Sets theonofflineevent handler.voidsetOnonline(java.lang.Object ononline)Sets theononlineevent handler.voidsetOnpagehide(java.lang.Object onpagehide)Sets theonpagehideevent handler.voidsetOnpageshow(java.lang.Object onpageshow)Sets theonpageshowevent handler.voidsetOnpause(java.lang.Object onpause)Sets theonpauseevent handler.voidsetOnplay(java.lang.Object onplay)Sets theonplayevent handler.voidsetOnplaying(java.lang.Object onplaying)Sets theonplayingevent handler.voidsetOnpointercancel(java.lang.Object onpointercancel)Sets theonpointercancelevent handler.voidsetOnpointerdown(java.lang.Object onpointerdown)Sets theonpointerdownevent handler.voidsetOnpointerenter(java.lang.Object onpointerenter)Sets theonpointerenterevent handler.voidsetOnpointerleave(java.lang.Object onpointerleave)Sets theonpointerleaveevent handler.voidsetOnpointermove(java.lang.Object onpointermove)Sets theonpointermoveevent handler.voidsetOnpointerout(java.lang.Object onpointerout)Sets theonpointeroutevent handler.voidsetOnpointerover(java.lang.Object onpointerover)Sets theonpointeroverevent handler.voidsetOnpointerup(java.lang.Object onpointerup)Sets theonpointerupevent handler.voidsetOnpopstate(java.lang.Object onpopstate)Sets theonpopstateevent handler.voidsetOnprogress(java.lang.Object onprogress)Sets theonprogressevent handler.voidsetOnratechange(java.lang.Object onratechange)Sets theonratechangeevent handler.voidsetOnrejectionhandled(java.lang.Object onrejectionhandled)Sets theonrejectionhandledevent handler.voidsetOnreset(java.lang.Object onreset)Sets theonresetevent handler.voidsetOnresize(java.lang.Object onresize)Sets theonresizeevent handler.voidsetOnscroll(java.lang.Object onscroll)Sets theonscrollevent handler.voidsetOnsearch(java.lang.Object onsearch)Sets theonsearchevent handler.voidsetOnseeked(java.lang.Object onseeked)Sets theonseekedevent handler.voidsetOnseeking(java.lang.Object onseeking)Sets theonseekingevent handler.voidsetOnselect(java.lang.Object onselect)Sets theonselectevent handler.voidsetOnstalled(java.lang.Object onstalled)Sets theonstalledevent handler.voidsetOnstorage(java.lang.Object onstorage)Sets theonstorageevent handler.voidsetOnsubmit(java.lang.Object onsubmit)Setter for theonsubmitevent handler.voidsetOnsuspend(java.lang.Object onsuspend)Sets theonsuspendevent handler.voidsetOntimeupdate(java.lang.Object ontimeupdate)Sets theontimeupdateevent handler.voidsetOntoggle(java.lang.Object ontoggle)Sets theontoggleevent handler.voidsetOntransitionend(java.lang.Object ontransitionend)Sets theontransitionendevent handler.voidsetOnunhandledrejection(java.lang.Object onunhandledrejection)Sets theonunhandledrejectionevent handler.voidsetOnunload(java.lang.Object onunload)Sets theonunloadevent handler.voidsetOnvolumechange(java.lang.Object onvolumechange)Sets theonvolumechangeevent handler.voidsetOnwaiting(java.lang.Object onwaiting)Sets theonwaitingevent handler.voidsetOnwebkitanimationend(java.lang.Object onwebkitanimationend)Sets theonwebkitanimationendevent handler.voidsetOnwebkitanimationiteration(java.lang.Object onwebkitanimationiteration)Sets theonwebkitanimationiterationevent handler.voidsetOnwebkitanimationstart(java.lang.Object onwebkitanimationstart)Sets theonwebkitanimationstartevent handler.voidsetOnwebkittransitionend(java.lang.Object onwebkittransitionend)Sets theonwebkittransitionendevent handler.voidsetOnwheel(java.lang.Object onwheel)Sets theonwheelevent handler.voidsetOpener(java.lang.Object newValue)Sets theopenerproperty.voidsetOuterHeight(int height)Sets theouterHeight.voidsetOuterWidth(int width)Sets theouterWidth.voidsetParentScope(org.htmlunit.corejs.javascript.Scriptable parent)Does nothing.voidsetPrototypes(java.util.Map<java.lang.Class<? extends org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable> map)Sets the prototypes for HtmlUnit host classes.voidsetStatus(java.lang.String message)Sets the text from the status line.static java.lang.ObjectsetTimeout(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function function)Sets a chunk of JavaScript to be invoked at some specified time later.voidsetTop(java.lang.Object o)Sets the value of thetopproperty.voidstop()Should implement the stop() function on the window object.voidtriggerOnError(ScriptException e)Triggers 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, setEventHandler
-
Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getScriptableFor, getStartingScope, getWindow, getWindow, getWithPreemption, has, hasInstance, initParentScope, makeScriptableFor, setClassName, setDomNode, setDomNode, setupPromise, setupRejectedPromise
-
Methods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, querySlot, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setPrototype, size
-
-
-
-
Field Detail
-
LOG
private static final org.apache.commons.logging.Log LOG
-
TEMPORARY
public static final int TEMPORARY
To be documented.- See Also:
- Constant Field Values
-
PERSISTENT
public static final int PERSISTENT
To be documented.- See Also:
- Constant Field Values
-
document_
private Document document_
-
documentProxy_
private DocumentProxy documentProxy_
-
navigator_
private Navigator navigator_
-
clientInformation_
private java.lang.Object clientInformation_
-
webWindow_
private WebWindow webWindow_
-
windowProxy_
private WindowProxy windowProxy_
-
screen_
private Screen screen_
-
history_
private History history_
-
location_
private Location location_
-
selection_
private Selection selection_
-
currentEvent_
private Event currentEvent_
-
status_
private java.lang.String status_
-
prototypes_
private java.util.Map<java.lang.Class<? extends org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable> prototypes_
-
controllers_
private java.lang.Object controllers_
-
opener_
private java.lang.Object opener_
-
top_
private java.lang.Object top_
-
crypto_
private Crypto crypto_
-
storages_
private final java.util.EnumMap<StorageHolder.Type,Storage> storages_
-
animationFrames_
private transient java.util.List<Window.AnimationFrame> animationFrames_
-
-
Method Detail
-
jsConstructor
public static org.htmlunit.corejs.javascript.Scriptable jsConstructor(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.Scriptable scope, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function ctorObj, boolean inNewExpr)Creates an instance.- Parameters:
cx- the current contextscope- the scopeargs- the argumentsctorObj- the function objectinNewExpr- Is new or not- Returns:
- the java object to allow JavaScript to access
-
readObject
private void readObject(java.io.ObjectInputStream stream) throws java.io.IOException, java.lang.ClassNotFoundExceptionRestores the transient fields during deserialization.- Parameters:
stream- the stream to read the object from- Throws:
java.io.IOException- if an IO error occursjava.lang.ClassNotFoundException- if a class is not found
-
getPrototype
public org.htmlunit.corejs.javascript.Scriptable getPrototype(java.lang.Class<? extends HtmlUnitScriptable> jsClass)
Returns the prototype object corresponding to the specified HtmlUnit class inside the window scope.- Overrides:
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(java.util.Map<java.lang.Class<? extends org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable> map)
Sets the prototypes for HtmlUnit host classes.- Parameters:
map- a Map of (Class,Scriptable)
-
alert
public void alert(java.lang.Object message)
The JavaScript functionalert().- Parameters:
message- the message
-
btoa
public java.lang.String btoa(java.lang.String stringToEncode)
Creates a base-64 encoded ASCII string from a string of binary data.- Specified by:
btoain interfaceWindowOrWorkerGlobalScope- Parameters:
stringToEncode- string to encode- Returns:
- the encoded string
-
atob
public java.lang.String atob(java.lang.String encodedData)
Decodes a string of data which has been encoded using base-64 encoding.- Specified by:
atobin interfaceWindowOrWorkerGlobalScope- Parameters:
encodedData- the encoded string- Returns:
- the decoded value
-
confirm
public boolean confirm(java.lang.String message)
The JavaScript functionconfirm.- Parameters:
message- the message- Returns:
- true if ok was pressed, false if cancel was pressed
-
prompt
public java.lang.String prompt(java.lang.String message, java.lang.Object defaultValue)The JavaScript functionprompt.- Parameters:
message- the messagedefaultValue- the default value displayed in the text input field- Returns:
- the value typed in or
nullif the user pressedcancel
-
getDocument_js
public DocumentProxy getDocument_js()
Returns the JavaScript propertydocument.- Returns:
- the document
-
getDocument
public Document getDocument()
Returns the window's current document.- Returns:
- the window's current document
-
getEvent
public java.lang.Object getEvent()
Returns the current event.- Returns:
- the current event, or
nullif no event is currently available
-
getCurrentEvent
public Event getCurrentEvent()
Returns the current event (used internally regardless of the emulation mode).- Returns:
- the current event, or
nullif no event is currently available
-
setCurrentEvent
public void setCurrentEvent(Event event)
Sets the current event.- Parameters:
event- the current event
-
open
public WindowProxy open(java.lang.Object url, java.lang.Object name, java.lang.Object features, java.lang.Object replace)
Opens a new window.- Parameters:
url- when a new document is opened, url is a String that specifies a MIME type for the document. When a new window is opened, url is a String that specifies the URL to render in the new windowname- the namefeatures- the featuresreplace- whether to replace in the history list or no- Returns:
- the newly opened window, or
nullif popup windows have been disabled - See Also:
WebClientOptions.isPopupBlockerEnabled(), MSDN documentation
-
makeUrlForOpenWindow
private java.net.URL makeUrlForOpenWindow(java.lang.String urlString)
-
setTimeout
public static java.lang.Object setTimeout(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function function)Sets a chunk of JavaScript to be invoked at some specified time later. The invocation occurs only if the window is opened after the delay and does not contain an other page than the one that originated the setTimeout.- Parameters:
context- the JavaScript contextscope- the scopethisObj- the scriptableargs- the arguments passed into the methodfunction- the function- Returns:
- the id of the created timer
- See Also:
- MDN web docs
-
setInterval
public static java.lang.Object setInterval(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable scope, org.htmlunit.corejs.javascript.Scriptable thisObj, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function function)Sets a chunk of JavaScript to be invoked each time a specified number of milliseconds has elapsed.- Parameters:
context- the JavaScript contextscope- the scopethisObj- the scriptableargs- the arguments passed into the methodfunction- the function- Returns:
- the id of the created interval
- See Also:
- MDN web docs
-
clearTimeout
public void clearTimeout(int timeoutId)
Cancels a time-out previously set with thesetTimeout(Context, Scriptable, Scriptable, Object[], Function)method.- Parameters:
timeoutId- identifier for the timeout to clear as returned bysetTimeout(Context, Scriptable, Scriptable, Object[], Function)
-
clearInterval
public void clearInterval(int intervalID)
Cancels the interval previously started using thesetInterval(Context, Scriptable, Scriptable, Object[], Function)method. Current implementation does nothing.- Parameters:
intervalID- specifies the interval to cancel as returned by thesetInterval(Context, Scriptable, Scriptable, Object[], Function)method- See Also:
- MSDN documentation
-
getNavigator
public Navigator getNavigator()
Returns the JavaScript propertynavigator.- Returns:
- the navigator
-
getClientInformation
public java.lang.Object getClientInformation()
Returns the JavaScript propertyclientInformation.- Returns:
- the client information
-
setClientInformation
public void setClientInformation(java.lang.Object clientInformation)
- Parameters:
clientInformation- the new value
-
getWindow_js
public Window getWindow_js()
Returns the window property. This is a synonym forself.- Returns:
- the window property (a reference to
this)
-
getSelf
public Window getSelf()
Returns theselfproperty.- Returns:
- this
-
getLocalStorage
public Storage getLocalStorage()
Returns thelocalStorageproperty.- Returns:
- the
localStorageproperty
-
getSessionStorage
public Storage getSessionStorage()
Returns thesessionStorageproperty.- Returns:
- the
sessionStorageproperty
-
getStorage
public Storage getStorage(StorageHolder.Type storageType)
Gets the storage of the specified type.- Parameters:
storageType- the type- Returns:
- the storage
-
getLocation
public Location getLocation()
Returns thelocationproperty.- Returns:
- the
locationproperty
-
setLocation
public void setLocation(java.lang.String newLocation) throws java.io.IOExceptionSets thelocationproperty. This will cause a reload of the window.- Parameters:
newLocation- the URL of the new content- Throws:
java.io.IOException- when location loading fails
-
dump
public void dump(java.lang.String message)
Logs messages to the browser's standard output (stdout). If the browser was started from a terminal, output sent to dump() will appear in the terminal. Output from dump() is not sent to the browser's developer tools console. To log to the developer tools console, use console.log().HtmlUnit always uses the WebConsole.
- Parameters:
message- the message to log
-
animateAnimationsFrames
public int animateAnimationsFrames()
Invokes all the animation callbacks registered for this window by callingrequestAnimationFrame(Object)once.- Returns:
- the number of pending animation callbacks
-
requestAnimationFrame
public int requestAnimationFrame(java.lang.Object callback)
Add callback to the list of animationFrames.- Parameters:
callback- the function to call when it's time to update the animation- Returns:
- an identification id
- See Also:
- MDN Doc
-
cancelAnimationFrame
public void cancelAnimationFrame(java.lang.Object requestId)
Remove the callback from the list of animationFrames.- Parameters:
requestId- the ID value returned by the call to window.requestAnimationFrame()- See Also:
- MDN Doc
-
getScreen
public Screen getScreen()
Returns thescreenproperty.- Returns:
- the
screenproperty
-
getHistory
public History getHistory()
Returns thehistoryproperty.- Returns:
- the
historyproperty
-
getExternal
public External getExternal()
Returns theexternalproperty.- Returns:
- the
externalproperty
-
initialize
public void initialize(WebWindow webWindow, Page pageToEnclose)
Initializes this window.- Parameters:
webWindow- the web window corresponding to this windowpageToEnclose- the page that will become the enclosing page
-
initialize
public void initialize(Page enclosedPage)
Initialize the object.- Parameters:
enclosedPage- the page containing the JavaScript
-
initialize
public void initialize()
Initializes the object. Only called for Windows with no contents.
-
getTop
public java.lang.Object getTop()
Returns the value of thetopproperty.- Returns:
- the value of
top
-
setTop
public void setTop(java.lang.Object o)
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
public java.lang.Object getOpener()
Returns the value of theopenerproperty.- Returns:
- the value of the
opener, ornullfor a top level window
-
setOpener
public void setOpener(java.lang.Object newValue)
Sets theopenerproperty.- Parameters:
newValue- the new value
-
getFrameElement
public HtmlUnitScriptable getFrameElement()
Returns the (i)frame in which the window is contained.- Returns:
nullfor a top level window
-
getFrames_js
public 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
private HTMLCollection getFrames()
Returns the live collection of frames contained by this window.- Returns:
- the live collection of frames contained by this window
-
getWebWindow
public WebWindow getWebWindow()
Returns the WebWindow associated with this Window.- Returns:
- the WebWindow
-
focus
public void focus()
Sets the focus to this element.
-
blur
public void blur()
Removes focus from this element.
-
close_js
public void close_js()
Closes this window.
-
isClosed
public boolean isClosed()
Indicates if this window is closed.- Returns:
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
public java.lang.Object getOnload()
Returns theonloadproperty. Note that this is not necessarily a function if something else has been set.- Returns:
- the
onloadproperty
-
setOnload
public void setOnload(java.lang.Object onload)
Sets the value of theonloadevent handler.- Parameters:
onload- the new handler
-
setOnblur
public void setOnblur(java.lang.Object onblur)
Sets the value of theonblurevent handler.- Parameters:
onblur- the new handler
-
getOnblur
public java.lang.Object getOnblur()
Returns theonblurproperty (not necessary a function if something else has been set).- Returns:
- the
onblurproperty
-
getOnclick
public java.lang.Object getOnclick()
Returns theonclickproperty (not necessary a function if something else has been set).- Returns:
- the
onclickproperty
-
setOnclick
public void setOnclick(java.lang.Object onclick)
Sets the value of theonclickevent handler.- Parameters:
onclick- the new handler
-
getOndblclick
public java.lang.Object getOndblclick()
Returns theondblclickproperty (not necessary a function if something else has been set).- Returns:
- the
ondblclickproperty
-
setOndblclick
public void setOndblclick(java.lang.Object ondblclick)
Sets the value of theondblclickevent handler.- Parameters:
ondblclick- the new handler
-
getOnhashchange
public java.lang.Object getOnhashchange()
Returns theonhashchangeproperty (not necessary a function if something else has been set).- Returns:
- the
onhashchangeproperty
-
setOnhashchange
public void setOnhashchange(java.lang.Object onhashchange)
Sets the value of theonhashchangeevent handler.- Parameters:
onhashchange- the new handler
-
getName
public java.lang.String getName()
Returns the value of the window'snameproperty.- Returns:
- the value of the window's
nameproperty
-
setName
public void setName(java.lang.String name)
Sets the value of the window'snameproperty.- Parameters:
name- the value of the window'snameproperty
-
getOnbeforeunload
public java.lang.Object getOnbeforeunload()
Returns the value of the window'sonbeforeunloadproperty.- Returns:
- the value of the window's
onbeforeunloadproperty
-
setOnbeforeunload
public void setOnbeforeunload(java.lang.Object onbeforeunload)
Sets the value of the window'sonbeforeunloadproperty.- Parameters:
onbeforeunload- the value of the window'sonbeforeunloadproperty
-
getOnerror
public java.lang.Object getOnerror()
Returns the value of the window'sonerrorproperty.- Returns:
- the value of the window's
onerrorproperty
-
setOnerror
public void setOnerror(java.lang.Object onerror)
Sets the value of the window'sonerrorproperty.- Parameters:
onerror- the value of the window'sonerrorproperty
-
getOnmessage
public java.lang.Object getOnmessage()
Returns the value of the window'sonmessageproperty.- Returns:
- the value of the window's
onmessageproperty
-
setOnmessage
public void setOnmessage(java.lang.Object onmessage)
Sets the value of the window'sonmessageproperty.- Parameters:
onmessage- the value of the window'sonmessageproperty
-
triggerOnError
public void triggerOnError(ScriptException e)
Triggers theonerrorhandler, if one has been set.- Parameters:
e- the error that needs to be reported
-
setHandlerForJavaScript
private void setHandlerForJavaScript(java.lang.String eventName, java.lang.Object handler)
-
getWithFallback
public java.lang.Object getWithFallback(java.lang.String name)
To be called when the property detection fails in normal scenarios.- Parameters:
name- the name- Returns:
- the found object, or
Scriptable.NOT_FOUND
-
get
public java.lang.Object get(int index, org.htmlunit.corejs.javascript.Scriptable start)- Specified by:
getin interfaceorg.htmlunit.corejs.javascript.Scriptable- Overrides:
getin classorg.htmlunit.corejs.javascript.ScriptableObject
-
getFrameWindowByName
private static java.lang.Object getFrameWindowByName(HtmlPage page, java.lang.String name)
-
getElementsByName
private java.lang.Object getElementsByName(HtmlPage page, java.lang.String name)
-
getProxy
public static WindowProxy getProxy(WebWindow w)
Returns the proxy for the specified window.- Parameters:
w- the window whose proxy is to be returned- Returns:
- the proxy for the specified window
-
getStatus
public java.lang.String getStatus()
Returns the text from the status line.- Returns:
- the status line text
-
setStatus
public void setStatus(java.lang.String message)
Sets the text from the status line.- Parameters:
message- the status line text
-
getInnerWidth
public int getInnerWidth()
Returns theinnerWidth.- Returns:
- the
innerWidth - See Also:
- Mozilla doc
-
setInnerWidth
public void setInnerWidth(int width)
Sets theinnerWidth.- Parameters:
width- theinnerWidth
-
getOuterWidth
public int getOuterWidth()
Returns theouterWidth.- Returns:
- the
outerWidth - See Also:
- Mozilla doc
-
setOuterWidth
public void setOuterWidth(int width)
Sets theouterWidth.- Parameters:
width- theouterWidth
-
getInnerHeight
public int getInnerHeight()
Returns theinnerHeight.- Returns:
- the
innerHeight - See Also:
- Mozilla doc
-
setInnerHeight
public void setInnerHeight(int height)
Sets theinnerHeight.- Parameters:
height- theinnerHeight
-
getOuterHeight
public int getOuterHeight()
Returns theouterHeight.- Returns:
- the
outerHeight - See Also:
- Mozilla doc
-
setOuterHeight
public void setOuterHeight(int height)
Sets theouterHeight.- Parameters:
height- theouterHeight
-
print
public void print()
Prints the current page. The current implementation uses thePrintHandlerdefined for theWebClientto process the window.- See Also:
- Mozilla documentation, MSDN documentation
-
captureEvents
public void captureEvents(java.lang.String type)
Does nothing special anymore.- Parameters:
type- the type of events to capture- See Also:
Document.captureEvents(String)
-
releaseEvents
public void releaseEvents(java.lang.String type)
Does nothing special anymore.- Parameters:
type- the type of events to capture- See Also:
Document.releaseEvents(String)
-
getComputedStyle
public ComputedCSSStyleDeclaration getComputedStyle(java.lang.Object element, java.lang.String pseudoElement)
Returns computed style of the element. Computed style represents the final computed values of all CSS properties for the element. This method's return value is of the same type as that ofelement.style, but the value returned by this method is read-only.- Parameters:
element- the elementpseudoElement- a string specifying the pseudo-element to match (may benull); e.g. ':before'- Returns:
- the computed style
-
getSelection
public Selection getSelection()
Returns the current selection.- Returns:
- the current selection
-
getSelectionImpl
public Selection getSelectionImpl()
Returns the current selection.- Returns:
- the current selection
-
getControllers
public java.lang.Object getControllers()
Gets thecontrollers. The result doesn't currently matter but it is important to return an object as some JavaScript libraries check it.- Returns:
- some object
- See Also:
- Mozilla documentation
-
setControllers
public void setControllers(java.lang.Object value)
Sets thecontrollers.- Parameters:
value- the new value
-
getMozInnerScreenX
public int getMozInnerScreenX()
Returns the value 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:
- window.stop
-
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
public Netscape getNetscape()
Returns the value ofnetscapeproperty.- Returns:
- the value of
netscapeproperty
-
isConst
public boolean isConst(java.lang.String name)
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
public boolean dispatchEvent(Event event)
Dispatches an event into the event system (standards-conformant browsers only). See the Gecko DOM reference for more information.- Overrides:
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
public java.lang.Object getOnchange()
Getter for theonchangeevent handler.- Returns:
- the handler
-
setOnchange
public void setOnchange(java.lang.Object onchange)
Setter for theonchangeevent handler.- Parameters:
onchange- the handler
-
getOnsubmit
public java.lang.Object getOnsubmit()
Getter for theonsubmitevent handler.- Returns:
- the handler
-
setOnsubmit
public void setOnsubmit(java.lang.Object onsubmit)
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, java.lang.Object[] args, org.htmlunit.corejs.javascript.Function funObj)Posts a message.- Parameters:
context- the current contextscope- the scopethisObj- this objectargs- the script(s) to importfunObj- the JS function called- See Also:
- MDN documentation
-
getPort
public static int getPort(java.net.URL url)
Returns the port of the specified URL.- Parameters:
url- the URL- Returns:
- the port
-
getPerformance
public Performance getPerformance()
Returns theperformanceproperty.- Returns:
- the
performanceproperty
-
getDevicePixelRatio
public int getDevicePixelRatio()
Returns thedevicePixelRatioproperty.- Returns:
- the
devicePixelRatioproperty
-
getStyleMedia
public StyleMedia getStyleMedia()
Returns thestyleMediaproperty.- Returns:
- the
styleMediaproperty
-
matchMedia
public MediaQueryList matchMedia(java.lang.String mediaQueryString)
Returns a new MediaQueryList object representing the parsed results of the specified media query string.- Parameters:
mediaQueryString- the media query- Returns:
- a new MediaQueryList object
-
find
public boolean find(java.lang.String search, boolean caseSensitive, boolean backwards, boolean wrapAround, boolean wholeWord, boolean searchInFrames, boolean showDialog)Stub only at the moment.- Parameters:
search- the text string for which to searchcaseSensitive- if true, specifies a case-sensitive searchbackwards- if true, specifies a backward searchwrapAround- if true, specifies a wrap around searchwholeWord- if true, specifies a whole word searchsearchInFrames- if true, specifies a search in framesshowDialog- if true, specifies a show Dialog.- Returns:
- false
-
getSpeechSynthesis
public SpeechSynthesis getSpeechSynthesis()
Returns thespeechSynthesisproperty.- Returns:
- the
speechSynthesisproperty
-
getOffscreenBuffering
public java.lang.Object getOffscreenBuffering()
Returns theoffscreenBufferingproperty.- Returns:
- the
offscreenBufferingproperty
-
getCrypto
public Crypto getCrypto()
Returns thecryptoproperty.- Returns:
- the
cryptoproperty
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
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
public void setOnfocus(java.lang.Object onfocus)
Sets theonfocusevent handler.- Parameters:
onfocus- theonfocusevent handler
-
getOndragend
public org.htmlunit.corejs.javascript.Function getOndragend()
Returns theondragendevent handler.- Returns:
- the
ondragendevent handler
-
setOndragend
public void setOndragend(java.lang.Object ondragend)
Sets theondragendevent handler.- Parameters:
ondragend- theondragendevent handler
-
getOninvalid
public org.htmlunit.corejs.javascript.Function getOninvalid()
Returns theoninvalidevent handler.- Returns:
- the
oninvalidevent handler
-
setOninvalid
public void setOninvalid(java.lang.Object oninvalid)
Sets theoninvalidevent handler.- Parameters:
oninvalid- theoninvalidevent handler
-
getOnpointerout
public org.htmlunit.corejs.javascript.Function getOnpointerout()
Returns theonpointeroutevent handler.- Returns:
- the
onpointeroutevent handler
-
setOnpointerout
public void setOnpointerout(java.lang.Object onpointerout)
Sets theonpointeroutevent handler.- Parameters:
onpointerout- theonpointeroutevent handler
-
getOnratechange
public org.htmlunit.corejs.javascript.Function getOnratechange()
Returns theonratechangeevent handler.- Returns:
- the
onratechangeevent handler
-
setOnratechange
public void setOnratechange(java.lang.Object onratechange)
Sets theonratechangeevent handler.- Parameters:
onratechange- theonratechangeevent handler
-
getOnanimationiteration
public org.htmlunit.corejs.javascript.Function getOnanimationiteration()
Returns theonanimationiterationevent handler.- Returns:
- the
onanimationiterationevent handler
-
setOnanimationiteration
public void setOnanimationiteration(java.lang.Object onanimationiteration)
Sets theonanimationiterationevent handler.- Parameters:
onanimationiteration- theonanimationiterationevent handler
-
getOncanplaythrough
public org.htmlunit.corejs.javascript.Function getOncanplaythrough()
Returns theoncanplaythroughevent handler.- Returns:
- the
oncanplaythroughevent handler
-
setOncanplaythrough
public void setOncanplaythrough(java.lang.Object oncanplaythrough)
Sets theoncanplaythroughevent handler.- Parameters:
oncanplaythrough- theoncanplaythroughevent handler
-
getOncancel
public org.htmlunit.corejs.javascript.Function getOncancel()
Returns theoncancelevent handler.- Returns:
- the
oncancelevent handler
-
setOncancel
public void setOncancel(java.lang.Object oncancel)
Sets theoncancelevent handler.- Parameters:
oncancel- theoncancelevent handler
-
getOnpointerenter
public org.htmlunit.corejs.javascript.Function getOnpointerenter()
Returns theonpointerenterevent handler.- Returns:
- the
onpointerenterevent handler
-
setOnpointerenter
public void setOnpointerenter(java.lang.Object onpointerenter)
Sets theonpointerenterevent handler.- Parameters:
onpointerenter- theonpointerenterevent handler
-
getOnselect
public org.htmlunit.corejs.javascript.Function getOnselect()
Returns theonselectevent handler.- Returns:
- the
onselectevent handler
-
setOnselect
public void setOnselect(java.lang.Object onselect)
Sets theonselectevent handler.- Parameters:
onselect- theonselectevent handler
-
getOnauxclick
public org.htmlunit.corejs.javascript.Function getOnauxclick()
Returns theonauxclickevent handler.- Returns:
- the
onauxclickevent handler
-
setOnauxclick
public void setOnauxclick(java.lang.Object onauxclick)
Sets theonauxclickevent handler.- Parameters:
onauxclick- theonauxclickevent handler
-
getOnscroll
public org.htmlunit.corejs.javascript.Function getOnscroll()
Returns theonscrollevent handler.- Returns:
- the
onscrollevent handler
-
setOnscroll
public void setOnscroll(java.lang.Object onscroll)
Sets theonscrollevent handler.- Parameters:
onscroll- theonscrollevent handler
-
getOnkeydown
public org.htmlunit.corejs.javascript.Function getOnkeydown()
Returns theonkeydownevent handler.- Returns:
- the
onkeydownevent handler
-
setOnkeydown
public void setOnkeydown(java.lang.Object onkeydown)
Sets theonkeydownevent handler.- Parameters:
onkeydown- theonkeydownevent handler
-
getOnwebkitanimationstart
public org.htmlunit.corejs.javascript.Function getOnwebkitanimationstart()
Returns theonwebkitanimationstartevent handler.- Returns:
- the
onwebkitanimationstartevent handler
-
setOnwebkitanimationstart
public void setOnwebkitanimationstart(java.lang.Object onwebkitanimationstart)
Sets theonwebkitanimationstartevent handler.- Parameters:
onwebkitanimationstart- theonwebkitanimationstartevent handler
-
getOnkeyup
public org.htmlunit.corejs.javascript.Function getOnkeyup()
Returns theonkeyupevent handler.- Returns:
- the
onkeyupevent handler
-
setOnkeyup
public void setOnkeyup(java.lang.Object onkeyup)
Sets theonkeyupevent handler.- Parameters:
onkeyup- theonkeyupevent handler
-
getOnreset
public org.htmlunit.corejs.javascript.Function getOnreset()
Returns theonresetevent handler.- Returns:
- the
onresetevent handler
-
setOnreset
public void setOnreset(java.lang.Object onreset)
Sets theonresetevent handler.- Parameters:
onreset- theonresetevent handler
-
getOnkeypress
public org.htmlunit.corejs.javascript.Function getOnkeypress()
Returns theonkeypressevent handler.- Returns:
- the
onkeypressevent handler
-
setOnkeypress
public void setOnkeypress(java.lang.Object onkeypress)
Sets theonkeypressevent handler.- Parameters:
onkeypress- theonkeypressevent handler
-
getOndrag
public org.htmlunit.corejs.javascript.Function getOndrag()
Returns theondragevent handler.- Returns:
- the
ondragevent handler
-
setOndrag
public void setOndrag(java.lang.Object ondrag)
Sets theondragevent handler.- Parameters:
ondrag- theondragevent handler
-
getOnseeked
public org.htmlunit.corejs.javascript.Function getOnseeked()
Returns theonseekedevent handler.- Returns:
- the
onseekedevent handler
-
setOnseeked
public void setOnseeked(java.lang.Object onseeked)
Sets theonseekedevent handler.- Parameters:
onseeked- theonseekedevent handler
-
getOnoffline
public org.htmlunit.corejs.javascript.Function getOnoffline()
Returns theonofflineevent handler.- Returns:
- the
onofflineevent handler
-
setOnoffline
public void setOnoffline(java.lang.Object onoffline)
Sets theonofflineevent handler.- Parameters:
onoffline- theonofflineevent handler
-
getOndeviceorientation
public org.htmlunit.corejs.javascript.Function getOndeviceorientation()
Returns theondeviceorientationevent handler.- Returns:
- the
ondeviceorientationevent handler
-
setOndeviceorientation
public void setOndeviceorientation(java.lang.Object ondeviceorientation)
Sets theondeviceorientationevent handler.- Parameters:
ondeviceorientation- theondeviceorientationevent handler
-
getOntoggle
public org.htmlunit.corejs.javascript.Function getOntoggle()
Returns theontoggleevent handler.- Returns:
- the
ontoggleevent handler
-
setOntoggle
public void setOntoggle(java.lang.Object ontoggle)
Sets theontoggleevent handler.- Parameters:
ontoggle- theontoggleevent handler
-
getOnplay
public org.htmlunit.corejs.javascript.Function getOnplay()
Returns theonplayevent handler.- Returns:
- the
onplayevent handler
-
setOnplay
public void setOnplay(java.lang.Object onplay)
Sets theonplayevent handler.- Parameters:
onplay- theonplayevent handler
-
getOncontextmenu
public org.htmlunit.corejs.javascript.Function getOncontextmenu()
Returns theoncontextmenuevent handler.- Returns:
- the
oncontextmenuevent handler
-
setOncontextmenu
public void setOncontextmenu(java.lang.Object oncontextmenu)
Sets theoncontextmenuevent handler.- Parameters:
oncontextmenu- theoncontextmenuevent handler
-
getOnmousemove
public org.htmlunit.corejs.javascript.Function getOnmousemove()
Returns theonmousemoveevent handler.- Returns:
- the
onmousemoveevent handler
-
setOnmousemove
public void setOnmousemove(java.lang.Object onmousemove)
Sets theonmousemoveevent handler.- Parameters:
onmousemove- theonmousemoveevent handler
-
getOnpointermove
public org.htmlunit.corejs.javascript.Function getOnpointermove()
Returns theonpointermoveevent handler.- Returns:
- the
onpointermoveevent handler
-
setOnpointermove
public void setOnpointermove(java.lang.Object onpointermove)
Sets theonpointermoveevent handler.- Parameters:
onpointermove- theonpointermoveevent handler
-
getOnmouseover
public org.htmlunit.corejs.javascript.Function getOnmouseover()
Returns theonmouseoverevent handler.- Returns:
- the
onmouseoverevent handler
-
setOnmouseover
public void setOnmouseover(java.lang.Object onmouseover)
Sets theonmouseoverevent handler.- Parameters:
onmouseover- theonmouseoverevent handler
-
getOnlostpointercapture
public org.htmlunit.corejs.javascript.Function getOnlostpointercapture()
Returns theonlostpointercaptureevent handler.- Returns:
- the
onlostpointercaptureevent handler
-
setOnlostpointercapture
public void setOnlostpointercapture(java.lang.Object onlostpointercapture)
Sets theonlostpointercaptureevent handler.- Parameters:
onlostpointercapture- theonlostpointercaptureevent handler
-
getOnpointerover
public org.htmlunit.corejs.javascript.Function getOnpointerover()
Returns theonpointeroverevent handler.- Returns:
- the
onpointeroverevent handler
-
setOnpointerover
public void setOnpointerover(java.lang.Object onpointerover)
Sets theonpointeroverevent handler.- Parameters:
onpointerover- theonpointeroverevent handler
-
getOnclose
public org.htmlunit.corejs.javascript.Function getOnclose()
Returns theoncloseevent handler.- Returns:
- the
oncloseevent handler
-
setOnclose
public void setOnclose(java.lang.Object onclose)
Sets theoncloseevent handler.- Parameters:
onclose- theoncloseevent handler
-
getOnanimationend
public org.htmlunit.corejs.javascript.Function getOnanimationend()
Returns theonanimationendevent handler.- Returns:
- the
onanimationendevent handler
-
setOnanimationend
public void setOnanimationend(java.lang.Object onanimationend)
Sets theonanimationendevent handler.- Parameters:
onanimationend- theonanimationendevent handler
-
getOndragenter
public org.htmlunit.corejs.javascript.Function getOndragenter()
Returns theondragenterevent handler.- Returns:
- the
ondragenterevent handler
-
setOndragenter
public void setOndragenter(java.lang.Object ondragenter)
Sets theondragenterevent handler.- Parameters:
ondragenter- theondragenterevent handler
-
getOnafterprint
public org.htmlunit.corejs.javascript.Function getOnafterprint()
Returns theonafterprintevent handler.- Returns:
- the
onafterprintevent handler
-
setOnafterprint
public void setOnafterprint(java.lang.Object onafterprint)
Sets theonafterprintevent handler.- Parameters:
onafterprint- theonafterprintevent handler
-
getOnmozfullscreenerror
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenerror()
Returns theonmozfullscreenerrorevent handler.- Returns:
- the
onmozfullscreenerrorevent handler
-
setOnmozfullscreenerror
public void setOnmozfullscreenerror(java.lang.Object onmozfullscreenerror)
Sets theonmozfullscreenerrorevent handler.- Parameters:
onmozfullscreenerror- theonmozfullscreenerrorevent handler
-
getOnmouseleave
public org.htmlunit.corejs.javascript.Function getOnmouseleave()
Returns theonmouseleaveevent handler.- Returns:
- the
onmouseleaveevent handler
-
setOnmouseleave
public void setOnmouseleave(java.lang.Object onmouseleave)
Sets theonmouseleaveevent handler.- Parameters:
onmouseleave- theonmouseleaveevent handler
-
getOnmousewheel
public org.htmlunit.corejs.javascript.Function getOnmousewheel()
Returns theonmousewheelevent handler.- Returns:
- the
onmousewheelevent handler
-
setOnmousewheel
public void setOnmousewheel(java.lang.Object onmousewheel)
Sets theonmousewheelevent handler.- Parameters:
onmousewheel- theonmousewheelevent handler
-
getOnseeking
public org.htmlunit.corejs.javascript.Function getOnseeking()
Returns theonseekingevent handler.- Returns:
- the
onseekingevent handler
-
setOnseeking
public void setOnseeking(java.lang.Object onseeking)
Sets theonseekingevent handler.- Parameters:
onseeking- theonseekingevent handler
-
getOncuechange
public org.htmlunit.corejs.javascript.Function getOncuechange()
Returns theoncuechangeevent handler.- Returns:
- the
oncuechangeevent handler
-
setOncuechange
public void setOncuechange(java.lang.Object oncuechange)
Sets theoncuechangeevent handler.- Parameters:
oncuechange- theoncuechangeevent handler
-
getOnpageshow
public org.htmlunit.corejs.javascript.Function getOnpageshow()
Returns theonpageshowevent handler.- Returns:
- the
onpageshowevent handler
-
setOnpageshow
public void setOnpageshow(java.lang.Object onpageshow)
Sets theonpageshowevent handler.- Parameters:
onpageshow- theonpageshowevent handler
-
getOnmozfullscreenchange
public org.htmlunit.corejs.javascript.Function getOnmozfullscreenchange()
Returns theonmozfullscreenchangeevent handler.- Returns:
- the
onmozfullscreenchangeevent handler
-
setOnmozfullscreenchange
public void setOnmozfullscreenchange(java.lang.Object onmozfullscreenchange)
Sets theonmozfullscreenchangeevent handler.- Parameters:
onmozfullscreenchange- theonmozfullscreenchangeevent handler
-
getOndurationchange
public org.htmlunit.corejs.javascript.Function getOndurationchange()
Returns theondurationchangeevent handler.- Returns:
- the
ondurationchangeevent handler
-
setOndurationchange
public void setOndurationchange(java.lang.Object ondurationchange)
Sets theondurationchangeevent handler.- Parameters:
ondurationchange- theondurationchangeevent handler
-
getOnplaying
public org.htmlunit.corejs.javascript.Function getOnplaying()
Returns theonplayingevent handler.- Returns:
- the
onplayingevent handler
-
setOnplaying
public void setOnplaying(java.lang.Object onplaying)
Sets theonplayingevent handler.- Parameters:
onplaying- theonplayingevent handler
-
getOnended
public org.htmlunit.corejs.javascript.Function getOnended()
Returns theonendedevent handler.- Returns:
- the
onendedevent handler
-
setOnended
public void setOnended(java.lang.Object onended)
Sets theonendedevent handler.- Parameters:
onended- theonendedevent handler
-
getOnloadeddata
public org.htmlunit.corejs.javascript.Function getOnloadeddata()
Returns theonloadeddataevent handler.- Returns:
- the
onloadeddataevent handler
-
setOnloadeddata
public void setOnloadeddata(java.lang.Object onloadeddata)
Sets theonloadeddataevent handler.- Parameters:
onloadeddata- theonloadeddataevent handler
-
getOnunhandledrejection
public org.htmlunit.corejs.javascript.Function getOnunhandledrejection()
Returns theonunhandledrejectionevent handler.- Returns:
- the
onunhandledrejectionevent handler
-
setOnunhandledrejection
public void setOnunhandledrejection(java.lang.Object onunhandledrejection)
Sets theonunhandledrejectionevent handler.- Parameters:
onunhandledrejection- theonunhandledrejectionevent handler
-
getOnmouseout
public org.htmlunit.corejs.javascript.Function getOnmouseout()
Returns theonmouseoutevent handler.- Returns:
- the
onmouseoutevent handler
-
setOnmouseout
public void setOnmouseout(java.lang.Object onmouseout)
Sets theonmouseoutevent handler.- Parameters:
onmouseout- theonmouseoutevent handler
-
getOnsuspend
public org.htmlunit.corejs.javascript.Function getOnsuspend()
Returns theonsuspendevent handler.- Returns:
- the
onsuspendevent handler
-
setOnsuspend
public void setOnsuspend(java.lang.Object onsuspend)
Sets theonsuspendevent handler.- Parameters:
onsuspend- theonsuspendevent handler
-
getOnwaiting
public org.htmlunit.corejs.javascript.Function getOnwaiting()
Returns theonwaitingevent handler.- Returns:
- the
onwaitingevent handler
-
setOnwaiting
public void setOnwaiting(java.lang.Object onwaiting)
Sets theonwaitingevent handler.- Parameters:
onwaiting- theonwaitingevent handler
-
getOncanplay
public org.htmlunit.corejs.javascript.Function getOncanplay()
Returns theoncanplayevent handler.- Returns:
- the
oncanplayevent handler
-
setOncanplay
public void setOncanplay(java.lang.Object oncanplay)
Sets theoncanplayevent handler.- Parameters:
oncanplay- theoncanplayevent handler
-
getOnmousedown
public org.htmlunit.corejs.javascript.Function getOnmousedown()
Returns theonmousedownevent handler.- Returns:
- the
onmousedownevent handler
-
setOnmousedown
public void setOnmousedown(java.lang.Object onmousedown)
Sets theonmousedownevent handler.- Parameters:
onmousedown- theonmousedownevent handler
-
getOnlanguagechange
public org.htmlunit.corejs.javascript.Function getOnlanguagechange()
Returns theonlanguagechangeevent handler.- Returns:
- the
onlanguagechangeevent handler
-
setOnlanguagechange
public void setOnlanguagechange(java.lang.Object onlanguagechange)
Sets theonlanguagechangeevent handler.- Parameters:
onlanguagechange- theonlanguagechangeevent handler
-
getOnemptied
public org.htmlunit.corejs.javascript.Function getOnemptied()
Returns theonemptiedevent handler.- Returns:
- the
onemptiedevent handler
-
setOnemptied
public void setOnemptied(java.lang.Object onemptied)
Sets theonemptiedevent handler.- Parameters:
onemptied- theonemptiedevent handler
-
getOnrejectionhandled
public org.htmlunit.corejs.javascript.Function getOnrejectionhandled()
Returns theonrejectionhandledevent handler.- Returns:
- the
onrejectionhandledevent handler
-
setOnrejectionhandled
public void setOnrejectionhandled(java.lang.Object onrejectionhandled)
Sets theonrejectionhandledevent handler.- Parameters:
onrejectionhandled- theonrejectionhandledevent handler
-
getOnpointercancel
public org.htmlunit.corejs.javascript.Function getOnpointercancel()
Returns theonpointercancelevent handler.- Returns:
- the
onpointercancelevent handler
-
setOnpointercancel
public void setOnpointercancel(java.lang.Object onpointercancel)
Sets theonpointercancelevent handler.- Parameters:
onpointercancel- theonpointercancelevent handler
-
getOnresize
public org.htmlunit.corejs.javascript.Function getOnresize()
Returns theonresizeevent handler.- Returns:
- the
onresizeevent handler
-
setOnresize
public void setOnresize(java.lang.Object onresize)
Sets theonresizeevent handler.- Parameters:
onresize- theonresizeevent handler
-
getOnpause
public org.htmlunit.corejs.javascript.Function getOnpause()
Returns theonpauseevent handler.- Returns:
- the
onpauseevent handler
-
setOnpause
public void setOnpause(java.lang.Object onpause)
Sets theonpauseevent handler.- Parameters:
onpause- theonpauseevent handler
-
getOnloadstart
public org.htmlunit.corejs.javascript.Function getOnloadstart()
Returns theonloadstartevent handler.- Returns:
- the
onloadstartevent handler
-
setOnloadstart
public void setOnloadstart(java.lang.Object onloadstart)
Sets theonloadstartevent handler.- Parameters:
onloadstart- theonloadstartevent handler
-
getOnprogress
public org.htmlunit.corejs.javascript.Function getOnprogress()
Returns theonprogressevent handler.- Returns:
- the
onprogressevent handler
-
setOnprogress
public void setOnprogress(java.lang.Object onprogress)
Sets theonprogressevent handler.- Parameters:
onprogress- theonprogressevent handler
-
getOnpointerup
public org.htmlunit.corejs.javascript.Function getOnpointerup()
Returns theonpointerupevent handler.- Returns:
- the
onpointerupevent handler
-
setOnpointerup
public void setOnpointerup(java.lang.Object onpointerup)
Sets theonpointerupevent handler.- Parameters:
onpointerup- theonpointerupevent handler
-
getOnwheel
public org.htmlunit.corejs.javascript.Function getOnwheel()
Returns theonwheelevent handler.- Returns:
- the
onwheelevent handler
-
setOnwheel
public void setOnwheel(java.lang.Object onwheel)
Sets theonwheelevent handler.- Parameters:
onwheel- theonwheelevent handler
-
getOnpointerleave
public org.htmlunit.corejs.javascript.Function getOnpointerleave()
Returns theonpointerleaveevent handler.- Returns:
- the
onpointerleaveevent handler
-
setOnpointerleave
public void setOnpointerleave(java.lang.Object onpointerleave)
Sets theonpointerleaveevent handler.- Parameters:
onpointerleave- theonpointerleaveevent handler
-
getOnbeforeprint
public org.htmlunit.corejs.javascript.Function getOnbeforeprint()
Returns theonbeforeprintevent handler.- Returns:
- the
onbeforeprintevent handler
-
setOnbeforeprint
public void setOnbeforeprint(java.lang.Object onbeforeprint)
Sets theonbeforeprintevent handler.- Parameters:
onbeforeprint- theonbeforeprintevent handler
-
getOnstorage
public org.htmlunit.corejs.javascript.Function getOnstorage()
Returns theonstorageevent handler.- Returns:
- the
onstorageevent handler
-
setOnstorage
public void setOnstorage(java.lang.Object onstorage)
Sets theonstorageevent handler.- Parameters:
onstorage- theonstorageevent handler
-
getOnanimationstart
public org.htmlunit.corejs.javascript.Function getOnanimationstart()
Returns theonanimationstartevent handler.- Returns:
- the
onanimationstartevent handler
-
setOnanimationstart
public void setOnanimationstart(java.lang.Object onanimationstart)
Sets theonanimationstartevent handler.- Parameters:
onanimationstart- theonanimationstartevent handler
-
getOntimeupdate
public org.htmlunit.corejs.javascript.Function getOntimeupdate()
Returns theontimeupdateevent handler.- Returns:
- the
ontimeupdateevent handler
-
setOntimeupdate
public void setOntimeupdate(java.lang.Object ontimeupdate)
Sets theontimeupdateevent handler.- Parameters:
ontimeupdate- theontimeupdateevent handler
-
getOnpagehide
public org.htmlunit.corejs.javascript.Function getOnpagehide()
Returns theonpagehideevent handler.- Returns:
- the
onpagehideevent handler
-
setOnpagehide
public void setOnpagehide(java.lang.Object onpagehide)
Sets theonpagehideevent handler.- Parameters:
onpagehide- theonpagehideevent handler
-
getOnwebkitanimationiteration
public org.htmlunit.corejs.javascript.Function getOnwebkitanimationiteration()
Returns theonwebkitanimationiterationevent handler.- Returns:
- the
onwebkitanimationiterationevent handler
-
setOnwebkitanimationiteration
public void setOnwebkitanimationiteration(java.lang.Object onwebkitanimationiteration)
Sets theonwebkitanimationiterationevent handler.- Parameters:
onwebkitanimationiteration- theonwebkitanimationiterationevent handler
-
getOnabort
public org.htmlunit.corejs.javascript.Function getOnabort()
Returns theonabortevent handler.- Returns:
- the
onabortevent handler
-
setOnabort
public void setOnabort(java.lang.Object onabort)
Sets theonabortevent handler.- Parameters:
onabort- theonabortevent handler
-
getOnloadedmetadata
public org.htmlunit.corejs.javascript.Function getOnloadedmetadata()
Returns theonloadedmetadataevent handler.- Returns:
- the
onloadedmetadataevent handler
-
setOnloadedmetadata
public void setOnloadedmetadata(java.lang.Object onloadedmetadata)
Sets theonloadedmetadataevent handler.- Parameters:
onloadedmetadata- theonloadedmetadataevent handler
-
getOnmouseup
public org.htmlunit.corejs.javascript.Function getOnmouseup()
Returns theonmouseupevent handler.- Returns:
- the
onmouseupevent handler
-
setOnmouseup
public void setOnmouseup(java.lang.Object onmouseup)
Sets theonmouseupevent handler.- Parameters:
onmouseup- theonmouseupevent handler
-
getOndragover
public org.htmlunit.corejs.javascript.Function getOndragover()
Returns theondragoverevent handler.- Returns:
- the
ondragoverevent handler
-
setOndragover
public void setOndragover(java.lang.Object ondragover)
Sets theondragoverevent handler.- Parameters:
ondragover- theondragoverevent handler
-
getOnonline
public org.htmlunit.corejs.javascript.Function getOnonline()
Returns theononlineevent handler.- Returns:
- the
ononlineevent handler
-
setOnonline
public void setOnonline(java.lang.Object ononline)
Sets theononlineevent handler.- Parameters:
ononline- theononlineevent handler
-
getOnsearch
public org.htmlunit.corejs.javascript.Function getOnsearch()
Returns theonsearchevent handler.- Returns:
- the
onsearchevent handler
-
setOnsearch
public void setOnsearch(java.lang.Object onsearch)
Sets theonsearchevent handler.- Parameters:
onsearch- theonsearchevent handler
-
getOninput
public org.htmlunit.corejs.javascript.Function getOninput()
Returns theoninputevent handler.- Returns:
- the
oninputevent handler
-
setOninput
public void setOninput(java.lang.Object oninput)
Sets theoninputevent handler.- Parameters:
oninput- theoninputevent handler
-
getOnwebkittransitionend
public org.htmlunit.corejs.javascript.Function getOnwebkittransitionend()
Returns theonwebkittransitionendevent handler.- Returns:
- the
onwebkittransitionendevent handler
-
setOnwebkittransitionend
public void setOnwebkittransitionend(java.lang.Object onwebkittransitionend)
Sets theonwebkittransitionendevent handler.- Parameters:
onwebkittransitionend- theonwebkittransitionendevent handler
-
getOndevicemotion
public org.htmlunit.corejs.javascript.Function getOndevicemotion()
Returns theondevicemotionevent handler.- Returns:
- the
ondevicemotionevent handler
-
setOndevicemotion
public void setOndevicemotion(java.lang.Object ondevicemotion)
Sets theondevicemotionevent handler.- Parameters:
ondevicemotion- theondevicemotionevent handler
-
getOnstalled
public org.htmlunit.corejs.javascript.Function getOnstalled()
Returns theonstalledevent handler.- Returns:
- the
onstalledevent handler
-
setOnstalled
public void setOnstalled(java.lang.Object onstalled)
Sets theonstalledevent handler.- Parameters:
onstalled- theonstalledevent handler
-
getOnmouseenter
public org.htmlunit.corejs.javascript.Function getOnmouseenter()
Returns theonmouseenterevent handler.- Returns:
- the
onmouseenterevent handler
-
setOnmouseenter
public void setOnmouseenter(java.lang.Object onmouseenter)
Sets theonmouseenterevent handler.- Parameters:
onmouseenter- theonmouseenterevent handler
-
getOndragleave
public org.htmlunit.corejs.javascript.Function getOndragleave()
Returns theondragleaveevent handler.- Returns:
- the
ondragleaveevent handler
-
setOndragleave
public void setOndragleave(java.lang.Object ondragleave)
Sets theondragleaveevent handler.- Parameters:
ondragleave- theondragleaveevent handler
-
getOnpointerdown
public org.htmlunit.corejs.javascript.Function getOnpointerdown()
Returns theonpointerdownevent handler.- Returns:
- the
onpointerdownevent handler
-
setOnpointerdown
public void setOnpointerdown(java.lang.Object onpointerdown)
Sets theonpointerdownevent handler.- Parameters:
onpointerdown- theonpointerdownevent handler
-
getOndrop
public org.htmlunit.corejs.javascript.Function getOndrop()
Returns theondropevent handler.- Returns:
- the
ondropevent handler
-
setOndrop
public void setOndrop(java.lang.Object ondrop)
Sets theondropevent handler.- Parameters:
ondrop- theondropevent handler
-
getOnunload
public org.htmlunit.corejs.javascript.Function getOnunload()
Returns theonunloadevent handler.- Returns:
- the
onunloadevent handler
-
setOnunload
public void setOnunload(java.lang.Object onunload)
Sets theonunloadevent handler.- Parameters:
onunload- theonunloadevent handler
-
getOnwebkitanimationend
public org.htmlunit.corejs.javascript.Function getOnwebkitanimationend()
Returns theonwebkitanimationendevent handler.- Returns:
- the
onwebkitanimationendevent handler
-
setOnwebkitanimationend
public void setOnwebkitanimationend(java.lang.Object onwebkitanimationend)
Sets theonwebkitanimationendevent handler.- Parameters:
onwebkitanimationend- theonwebkitanimationendevent handler
-
getOndragstart
public org.htmlunit.corejs.javascript.Function getOndragstart()
Returns theondragstartevent handler.- Returns:
- the
ondragstartevent handler
-
setOndragstart
public void setOndragstart(java.lang.Object ondragstart)
Sets theondragstartevent handler.- Parameters:
ondragstart- theondragstartevent handler
-
getOntransitionend
public org.htmlunit.corejs.javascript.Function getOntransitionend()
Returns theontransitionendevent handler.- Returns:
- the
ontransitionendevent handler
-
setOntransitionend
public void setOntransitionend(java.lang.Object ontransitionend)
Sets theontransitionendevent handler.- Parameters:
ontransitionend- theontransitionendevent handler
-
getOndeviceorientationabsolute
public org.htmlunit.corejs.javascript.Function getOndeviceorientationabsolute()
Returns theondeviceorientationabsoluteevent handler.- Returns:
- the
ondeviceorientationabsoluteevent handler
-
setOndeviceorientationabsolute
public void setOndeviceorientationabsolute(java.lang.Object ondeviceorientationabsolute)
Sets theondeviceorientationabsoluteevent handler.- Parameters:
ondeviceorientationabsolute- theondeviceorientationabsoluteevent handler
-
getOnvolumechange
public org.htmlunit.corejs.javascript.Function getOnvolumechange()
Returns theonvolumechangeevent handler.- Returns:
- the
onvolumechangeevent handler
-
setOnvolumechange
public void setOnvolumechange(java.lang.Object onvolumechange)
Sets theonvolumechangeevent handler.- Parameters:
onvolumechange- theonvolumechangeevent handler
-
getOngotpointercapture
public org.htmlunit.corejs.javascript.Function getOngotpointercapture()
Returns theongotpointercaptureevent handler.- Returns:
- the
ongotpointercaptureevent handler
-
setOngotpointercapture
public void setOngotpointercapture(java.lang.Object ongotpointercapture)
Sets theongotpointercaptureevent handler.- Parameters:
ongotpointercapture- theongotpointercaptureevent handler
-
getOnpopstate
public org.htmlunit.corejs.javascript.Function getOnpopstate()
Returns theonpopstateevent handler.- Returns:
- the
onpopstateevent handler
-
setOnpopstate
public void setOnpopstate(java.lang.Object onpopstate)
Sets theonpopstateevent handler.- Parameters:
onpopstate- theonpopstateevent handler
-
getBrowserVersion
public BrowserVersion getBrowserVersion()
Gets the browser version currently used. optimized version- Overrides:
getBrowserVersionin classHtmlUnitScriptable- Returns:
- the browser version
-
put
public void put(java.lang.String name, org.htmlunit.corejs.javascript.Scriptable start, java.lang.Object value)Description copied from class:HtmlUnitScriptable- Specified by:
putin interfaceorg.htmlunit.corejs.javascript.Scriptable- Overrides:
putin classHtmlUnitScriptable
-
getIsSecureContext
public java.lang.Object getIsSecureContext()
- Returns:
- a boolean indicating whether the current context is secure (true) or not (false).
-
-