pub trait WindowMethods<D: DomTypes> {
Show 257 methods
// Required methods
fn Window(&self) -> Root<Dom<WindowProxy>>;
fn Self_(&self) -> Root<Dom<WindowProxy>>;
fn Document(&self) -> Root<Dom<Document>>;
fn Name(&self) -> DOMString;
fn SetName(&self, value: DOMString);
fn Location(&self) -> Root<Dom<Location>>;
fn History(&self) -> Root<Dom<History>>;
fn CustomElements(&self) -> Root<Dom<CustomElementRegistry>>;
fn Status(&self) -> DOMString;
fn SetStatus(&self, value: DOMString);
fn Close(&self);
fn Closed(&self) -> bool;
fn Stop(&self, _can_gc: CanGc);
fn Frames(&self) -> Root<Dom<WindowProxy>>;
fn Length(&self) -> u32;
fn GetTop(&self) -> Option<Root<Dom<WindowProxy>>>;
fn GetOpener(
&self,
cx: SafeJSContext,
_comp: InRealm<'_>,
retval: MutableHandleValue<'_>,
) -> Result<(), Error>;
fn SetOpener(
&self,
cx: SafeJSContext,
value: HandleValue<'_>,
) -> Result<(), Error>;
fn GetParent(&self) -> Option<Root<Dom<WindowProxy>>>;
fn GetFrameElement(&self) -> Option<Root<Dom<Element>>>;
fn Open(
&self,
url: USVString,
target: DOMString,
features: DOMString,
_can_gc: CanGc,
) -> Result<Option<Root<Dom<WindowProxy>>>, Error>;
fn Navigator(&self) -> Root<Dom<Navigator>>;
fn Alert(&self, message: DOMString);
fn Alert_(&self);
fn Confirm(&self, message: DOMString) -> bool;
fn Prompt(
&self,
message: DOMString,
default: DOMString,
) -> Option<DOMString>;
fn RequestAnimationFrame(&self, callback: Rc<FrameRequestCallback>) -> u32;
fn CancelAnimationFrame(&self, handle: u32);
fn PostMessage(
&self,
cx: SafeJSContext,
message: HandleValue<'_>,
targetOrigin: USVString,
transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>,
) -> Result<(), Error>;
fn PostMessage_(
&self,
cx: SafeJSContext,
message: HandleValue<'_>,
options: RootedTraceableBox<WindowPostMessageOptions>,
) -> Result<(), Error>;
fn CaptureEvents(&self);
fn ReleaseEvents(&self);
fn GetComputedStyle(
&self,
elt: &Element,
pseudoElt: Option<DOMString>,
) -> Root<Dom<CSSStyleDeclaration>>;
fn MatchMedia(&self, query: DOMString) -> Root<Dom<MediaQueryList>>;
fn Screen(&self) -> Root<Dom<Screen>>;
fn MoveTo(&self, x: i32, y: i32);
fn MoveBy(&self, x: i32, y: i32);
fn ResizeTo(&self, x: i32, y: i32);
fn ResizeBy(&self, x: i32, y: i32);
fn InnerWidth(&self) -> i32;
fn InnerHeight(&self) -> i32;
fn ScrollX(&self) -> i32;
fn PageXOffset(&self) -> i32;
fn ScrollY(&self) -> i32;
fn PageYOffset(&self) -> i32;
fn Scroll(&self, options: &ScrollToOptions, _can_gc: CanGc);
fn Scroll_(&self, x: f64, y: f64, _can_gc: CanGc);
fn ScrollTo(&self, options: &ScrollToOptions);
fn ScrollTo_(&self, x: f64, y: f64);
fn ScrollBy(&self, options: &ScrollToOptions, _can_gc: CanGc);
fn ScrollBy_(&self, x: f64, y: f64, _can_gc: CanGc);
fn ScreenX(&self) -> i32;
fn ScreenY(&self) -> i32;
fn OuterWidth(&self) -> i32;
fn OuterHeight(&self) -> i32;
fn DevicePixelRatio(&self) -> Finite<f64>;
fn Debug(&self, arg: DOMString);
fn Gc(&self);
fn Js_backtrace(&self);
fn WebdriverCallback(&self, cx: SafeJSContext, result: HandleValue<'_>);
fn WebdriverTimeout(&self);
fn TestRunner(&self) -> Root<Dom<TestRunner>>;
fn RunningAnimationCount(&self) -> u32;
fn GetSelection(&self) -> Option<Root<Dom<Selection>>>;
fn Event(&self, cx: SafeJSContext, retval: MutableHandleValue<'_>);
fn GetOnabort(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnabort(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnblur(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnblur(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOncancel(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOncancel(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOncanplay(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOncanplay(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOncanplaythrough(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOncanplaythrough(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnchange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnchange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnclick(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnclick(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnclose(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnclose(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOncontextmenu(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOncontextmenu(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOncuechange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOncuechange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOndblclick(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndblclick(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOndrag(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndrag(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOndragend(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndragend(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOndragenter(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndragenter(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOndragexit(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndragexit(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOndragleave(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndragleave(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOndragover(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndragover(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOndragstart(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndragstart(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOndrop(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndrop(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOndurationchange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOndurationchange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnemptied(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnemptied(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnended(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnended(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnerror(&self) -> Option<Rc<OnErrorEventHandlerNonNull>>;
fn SetOnerror(&self, value: Option<Rc<OnErrorEventHandlerNonNull>>);
fn GetOnfocus(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnfocus(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnformdata(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnformdata(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOninput(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOninput(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOninvalid(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOninvalid(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnkeydown(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnkeydown(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnkeypress(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnkeypress(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnkeyup(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnkeyup(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnload(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnload(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnloadeddata(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnloadeddata(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnloadedmetadata(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnloadedmetadata(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnloadstart(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnloadstart(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnmousedown(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnmousedown(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnmouseenter(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnmouseenter(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnmouseleave(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnmouseleave(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnmousemove(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnmousemove(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnmouseout(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnmouseout(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnmouseover(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnmouseover(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnmouseup(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnmouseup(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnwheel(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnwheel(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnpause(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnpause(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnplay(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnplay(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnplaying(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnplaying(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnprogress(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnprogress(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnratechange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnratechange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnreset(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnreset(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnresize(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnresize(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnscroll(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnscroll(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnsecuritypolicyviolation(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnsecuritypolicyviolation(
&self,
value: Option<Rc<EventHandlerNonNull>>,
);
fn GetOnseeked(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnseeked(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnseeking(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnseeking(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnselect(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnselect(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnshow(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnshow(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnstalled(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnstalled(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnsubmit(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnsubmit(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnsuspend(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnsuspend(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOntimeupdate(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOntimeupdate(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOntoggle(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOntoggle(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnvolumechange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnvolumechange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnwaiting(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnwaiting(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnanimationend(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnanimationend(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnanimationiteration(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnanimationiteration(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOntransitionrun(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOntransitionrun(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOntransitionend(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOntransitionend(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOntransitioncancel(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOntransitioncancel(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnselectstart(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnselectstart(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnselectionchange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnselectionchange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnafterprint(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnafterprint(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnbeforeprint(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnbeforeprint(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnbeforeunload(&self) -> Option<Rc<OnBeforeUnloadEventHandlerNonNull>>;
fn SetOnbeforeunload(
&self,
value: Option<Rc<OnBeforeUnloadEventHandlerNonNull>>,
);
fn GetOnhashchange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnhashchange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnlanguagechange(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnlanguagechange(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnmessage(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnmessage(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnmessageerror(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnmessageerror(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnoffline(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnoffline(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnonline(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnonline(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnpagehide(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnpagehide(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnpageshow(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnpageshow(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnpopstate(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnpopstate(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnrejectionhandled(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnrejectionhandled(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnstorage(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnstorage(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnunhandledrejection(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnunhandledrejection(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOnunload(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOnunload(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOngamepadconnected(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOngamepadconnected(&self, value: Option<Rc<EventHandlerNonNull>>);
fn GetOngamepaddisconnected(&self) -> Option<Rc<EventHandlerNonNull>>;
fn SetOngamepaddisconnected(&self, value: Option<Rc<EventHandlerNonNull>>);
fn LocalStorage(&self) -> Root<Dom<Storage>>;
fn Origin(&self) -> USVString;
fn Btoa(&self, data: DOMString) -> Result<DOMString, Error>;
fn Atob(&self, data: DOMString) -> Result<DOMString, Error>;
fn SetTimeout(
&self,
cx: SafeJSContext,
handler: StringOrFunction,
timeout: i32,
arguments: Vec<HandleValue<'_>>,
) -> i32;
fn ClearTimeout(&self, handle: i32);
fn SetInterval(
&self,
cx: SafeJSContext,
handler: StringOrFunction,
timeout: i32,
arguments: Vec<HandleValue<'_>>,
) -> i32;
fn ClearInterval(&self, handle: i32);
fn QueueMicrotask(&self, callback: Rc<VoidFunction>);
fn CreateImageBitmap(
&self,
image: HTMLImageElementOrHTMLCanvasElementOrOffscreenCanvasOrCSSStyleValueOrBlobOrImageData,
options: &ImageBitmapOptions,
_can_gc: CanGc,
) -> Rc<Promise>;
fn StructuredClone(
&self,
cx: SafeJSContext,
value: HandleValue<'_>,
options: RootedTraceableBox<StructuredSerializeOptions>,
rval: MutableHandleValue<'_>,
) -> Result<(), Error>;
fn Crypto(&self) -> Root<Dom<Crypto>>;
fn Performance(&self) -> Root<Dom<Performance>>;
fn IsSecureContext(&self) -> bool;
fn Fetch(
&self,
input: RequestOrUSVString,
init: RootedTraceableBox<RequestInit>,
_comp: InRealm<'_>,
_can_gc: CanGc,
) -> Rc<Promise>;
fn SessionStorage(&self) -> Root<Dom<Storage>>;
fn SupportedPropertyNames(&self) -> Vec<DOMString>;
fn NamedGetter(
&self,
cx: SafeJSContext,
name: DOMString,
) -> Option<NonNull<JSObject>>;
}