Struct Window

Source
pub struct Window(/* private fields */);

Implementations§

Source§

impl Window

Source

pub fn new(browser: &Browser) -> Window

Source

pub fn stop(&self) -> JsNullish

Source

pub fn release_events(&self) -> JsNullish

Source

pub fn print(&self) -> JsNullish

Source

pub fn get_selection(&self) -> JsNullable<Selection>

Source

pub fn focus(&self) -> JsNullish

Source

pub fn close(&self) -> JsNullish

Source

pub fn capture_events(&self) -> JsNullish

Source

pub fn blur(&self) -> JsNullish

Source

pub fn scroll_by( &self, options: &dyn ToJs<JsNullable<ScrollToOptions>>, ) -> JsNullish

Source

pub fn atob(&self, data: &dyn ToJs<JsString>) -> JsString

Source

pub fn request_animation_frame( &self, callback: &dyn ToJs<FrameRequestCallback>, ) -> JsNumber

Source

pub fn cancel_animation_frame(&self, handle: &dyn ToJs<JsNumber>) -> JsNullish

Source

pub fn scroll_to( &self, options: &dyn ToJs<JsNullable<ScrollToOptions>>, ) -> JsNullish

Source

pub fn scroll( &self, options: &dyn ToJs<JsNullable<ScrollToOptions>>, ) -> JsNullish

Source

pub fn queue_microtask(&self, callback: &dyn ToJs<VoidFunction>) -> JsNullish

Source

pub fn match_media(&self, query: &dyn ToJs<JsString>) -> MediaQueryList

Source

pub fn confirm(&self, message: &dyn ToJs<JsNullable<JsString>>) -> JsBoolean

Source

pub fn clear_timeout(&self, id: &dyn ToJs<JsNullable<JsNumber>>) -> JsNullish

Source

pub fn cancel_idle_callback(&self, handle: &dyn ToJs<JsNumber>) -> JsNullish

Source

pub fn clear_interval(&self, id: &dyn ToJs<JsNullable<JsNumber>>) -> JsNullish

Source

pub fn alert(&self, message: &dyn ToJs<JsNullable<JsValue>>) -> JsNullish

Source

pub fn btoa(&self, data: &dyn ToJs<JsString>) -> JsString

Source

pub fn report_error(&self, e: &dyn ToJs<JsValue>) -> JsNullish

Source

pub fn resize_by( &self, x: &dyn ToJs<JsNumber>, y: &dyn ToJs<JsNumber>, ) -> JsNullish

Source

pub fn request_idle_callback( &self, callback: &dyn ToJs<IdleRequestCallback>, options: &dyn ToJs<JsNullable<IdleRequestOptions>>, ) -> JsNumber

Source

pub fn prompt( &self, message: &dyn ToJs<JsNullable<JsString>>, _default: &dyn ToJs<JsNullable<JsString>>, ) -> JsNullable<JsString>

Source

pub fn post_message( &self, message: &dyn ToJs<JsValue>, options: &dyn ToJs<JsNullable<WindowPostMessageOptions>>, ) -> JsNullish

Source

pub fn move_to( &self, x: &dyn ToJs<JsNumber>, y: &dyn ToJs<JsNumber>, ) -> JsNullish

Source

pub fn move_by( &self, x: &dyn ToJs<JsNumber>, y: &dyn ToJs<JsNumber>, ) -> JsNullish

Source

pub fn scroll_to_with_x_y( &self, x: &dyn ToJs<JsNumber>, y: &dyn ToJs<JsNumber>, ) -> JsNullish

Source

pub fn fetch( &self, input: &dyn ToJs<JsValue>, init: &dyn ToJs<JsNullable<RequestInit>>, ) -> Promise<Response>

Source

pub fn get_computed_style( &self, elt: &Element, pseudoElt: &dyn ToJs<JsNullable<JsString>>, ) -> CSSStyleDeclaration

Source

pub fn create_image_bitmap( &self, image: &dyn ToJs<JsValue>, options: &dyn ToJs<JsNullable<ImageBitmapOptions>>, ) -> Promise<ImageBitmap>

Source

pub fn scroll_by_with_x_y( &self, x: &dyn ToJs<JsNumber>, y: &dyn ToJs<JsNumber>, ) -> JsNullish

Source

pub fn structured_clone<T: JsCast>( &self, value: &dyn ToJs<T>, options: &dyn ToJs<JsNullable<StructuredSerializeOptions>>, ) -> T

Source

pub fn scroll_with_x_y( &self, x: &dyn ToJs<JsNumber>, y: &dyn ToJs<JsNumber>, ) -> JsNullish

Source

pub fn resize_to( &self, width: &dyn ToJs<JsNumber>, height: &dyn ToJs<JsNumber>, ) -> JsNullish

Source

pub fn set_timeout( &self, handler: &dyn ToJs<JsValue>, timeout: &dyn ToJs<JsNullable<JsNumber>>, arguments: &dyn ToJs<Array<JsValue>>, ) -> JsNumber

Source

pub fn set_interval( &self, handler: &dyn ToJs<JsValue>, timeout: &dyn ToJs<JsNullable<JsNumber>>, arguments: &dyn ToJs<Array<JsValue>>, ) -> JsNumber

Source

pub fn post_message_with_message_targetOrigin_transfer( &self, message: &dyn ToJs<JsValue>, targetOrigin: &dyn ToJs<JsString>, transfer: &dyn ToJs<JsNullable<Array<JsValue>>>, ) -> JsNullish

Source

pub fn open( &self, url: &dyn ToJs<JsNullable<JsValue>>, target: &dyn ToJs<JsNullable<JsString>>, features: &dyn ToJs<JsNullable<JsString>>, ) -> JsNullable<Window>

Source

pub fn remove_event_listener( &self, type_: &dyn ToJs<JsString>, listener: &dyn ToJs<JsValue>, options: &dyn ToJs<JsNullable<JsValue>>, ) -> JsNullish

Source

pub fn add_event_listener( &self, type_: &dyn ToJs<JsString>, listener: &dyn ToJs<JsValue>, options: &dyn ToJs<JsNullable<JsValue>>, ) -> JsNullish

Source

pub fn create_image_bitmap_with_image_sx_sy_sw_sh_options( &self, image: &dyn ToJs<JsValue>, sx: &dyn ToJs<JsNumber>, sy: &dyn ToJs<JsNumber>, sw: &dyn ToJs<JsNumber>, sh: &dyn ToJs<JsNumber>, options: &dyn ToJs<JsNullable<ImageBitmapOptions>>, ) -> Promise<ImageBitmap>

Source

pub fn get_session_storage(&self) -> Storage

Source

pub fn set_session_storage(&self, value: &Storage)

Source

pub fn get_performance(&self) -> Performance

Source

pub fn set_performance(&self, value: &Performance)

Source

pub fn get_origin(&self) -> JsString

Source

pub fn set_origin(&self, value: &dyn ToJs<JsString>)

Source

pub fn get_is_secure_context(&self) -> JsBoolean

Source

pub fn set_is_secure_context(&self, value: &dyn ToJs<JsBoolean>)

Source

pub fn get_indexed_db(&self) -> IDBFactory

Source

pub fn set_indexed_db(&self, value: &IDBFactory)

Source

pub fn get_crypto(&self) -> Crypto

Source

pub fn set_crypto(&self, value: &Crypto)

Source

pub fn get_cross_origin_isolated(&self) -> JsBoolean

Source

pub fn set_cross_origin_isolated(&self, value: &dyn ToJs<JsBoolean>)

Source

pub fn get_caches(&self) -> CacheStorage

Source

pub fn set_caches(&self, value: &CacheStorage)

Source

pub fn get_local_storage(&self) -> Storage

Source

pub fn set_local_storage(&self, value: &Storage)

Source

pub fn get_onunload(&self) -> JsNullable<JsValue>

Source

pub fn set_onunload(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onunhandledrejection(&self) -> JsNullable<JsValue>

Source

pub fn set_onunhandledrejection(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onstorage(&self) -> JsNullable<JsValue>

Source

pub fn set_onstorage(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onrejectionhandled(&self) -> JsNullable<JsValue>

Source

pub fn set_onrejectionhandled(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpopstate(&self) -> JsNullable<JsValue>

Source

pub fn set_onpopstate(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpageshow(&self) -> JsNullable<JsValue>

Source

pub fn set_onpageshow(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpagehide(&self) -> JsNullable<JsValue>

Source

pub fn set_onpagehide(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ononline(&self) -> JsNullable<JsValue>

Source

pub fn set_ononline(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onoffline(&self) -> JsNullable<JsValue>

Source

pub fn set_onoffline(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onmessageerror(&self) -> JsNullable<JsValue>

Source

pub fn set_onmessageerror(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onmessage(&self) -> JsNullable<JsValue>

Source

pub fn set_onmessage(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onlanguagechange(&self) -> JsNullable<JsValue>

Source

pub fn set_onlanguagechange(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onhashchange(&self) -> JsNullable<JsValue>

Source

pub fn set_onhashchange(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ongamepaddisconnected(&self) -> JsNullable<JsValue>

Source

pub fn set_ongamepaddisconnected(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ongamepadconnected(&self) -> JsNullable<JsValue>

Source

pub fn set_ongamepadconnected(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onbeforeunload(&self) -> JsNullable<JsValue>

Source

pub fn set_onbeforeunload(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onbeforeprint(&self) -> JsNullable<JsValue>

Source

pub fn set_onbeforeprint(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onafterprint(&self) -> JsNullable<JsValue>

Source

pub fn set_onafterprint(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onwheel(&self) -> JsNullable<JsValue>

Source

pub fn set_onwheel(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onwebkittransitionend(&self) -> JsNullable<JsValue>

Source

pub fn set_onwebkittransitionend(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onwebkitanimationstart(&self) -> JsNullable<JsValue>

Source

pub fn set_onwebkitanimationstart(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onwebkitanimationiteration(&self) -> JsNullable<JsValue>

Source

pub fn set_onwebkitanimationiteration( &self, value: &dyn ToJs<JsNullable<JsValue>>, )

Source

pub fn get_onwebkitanimationend(&self) -> JsNullable<JsValue>

Source

pub fn set_onwebkitanimationend(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onwaiting(&self) -> JsNullable<JsValue>

Source

pub fn set_onwaiting(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onvolumechange(&self) -> JsNullable<JsValue>

Source

pub fn set_onvolumechange(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ontransitionstart(&self) -> JsNullable<JsValue>

Source

pub fn set_ontransitionstart(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ontransitionrun(&self) -> JsNullable<JsValue>

Source

pub fn set_ontransitionrun(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ontransitionend(&self) -> JsNullable<JsValue>

Source

pub fn set_ontransitionend(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ontransitioncancel(&self) -> JsNullable<JsValue>

Source

pub fn set_ontransitioncancel(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ontouchstart(&self) -> JsNullable<JsNullable<JsValue>>

Source

pub fn set_ontouchstart( &self, value: &dyn ToJs<JsNullable<JsNullable<JsValue>>>, )

Source

pub fn get_ontouchmove(&self) -> JsNullable<JsNullable<JsValue>>

Source

pub fn set_ontouchmove(&self, value: &dyn ToJs<JsNullable<JsNullable<JsValue>>>)

Source

pub fn get_ontouchend(&self) -> JsNullable<JsNullable<JsValue>>

Source

pub fn set_ontouchend(&self, value: &dyn ToJs<JsNullable<JsNullable<JsValue>>>)

Source

pub fn get_ontouchcancel(&self) -> JsNullable<JsNullable<JsValue>>

Source

pub fn set_ontouchcancel( &self, value: &dyn ToJs<JsNullable<JsNullable<JsValue>>>, )

Source

pub fn get_ontoggle(&self) -> JsNullable<JsValue>

Source

pub fn set_ontoggle(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ontimeupdate(&self) -> JsNullable<JsValue>

Source

pub fn set_ontimeupdate(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onsuspend(&self) -> JsNullable<JsValue>

Source

pub fn set_onsuspend(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onsubmit(&self) -> JsNullable<JsValue>

Source

pub fn set_onsubmit(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onstalled(&self) -> JsNullable<JsValue>

Source

pub fn set_onstalled(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onslotchange(&self) -> JsNullable<JsValue>

Source

pub fn set_onslotchange(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onselectstart(&self) -> JsNullable<JsValue>

Source

pub fn set_onselectstart(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onselectionchange(&self) -> JsNullable<JsValue>

Source

pub fn set_onselectionchange(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onselect(&self) -> JsNullable<JsValue>

Source

pub fn set_onselect(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onseeking(&self) -> JsNullable<JsValue>

Source

pub fn set_onseeking(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onseeked(&self) -> JsNullable<JsValue>

Source

pub fn set_onseeked(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onsecuritypolicyviolation(&self) -> JsNullable<JsValue>

Source

pub fn set_onsecuritypolicyviolation( &self, value: &dyn ToJs<JsNullable<JsValue>>, )

Source

pub fn get_onscrollend(&self) -> JsNullable<JsValue>

Source

pub fn set_onscrollend(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onscroll(&self) -> JsNullable<JsValue>

Source

pub fn set_onscroll(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onresize(&self) -> JsNullable<JsValue>

Source

pub fn set_onresize(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onreset(&self) -> JsNullable<JsValue>

Source

pub fn set_onreset(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onratechange(&self) -> JsNullable<JsValue>

Source

pub fn set_onratechange(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onprogress(&self) -> JsNullable<JsValue>

Source

pub fn set_onprogress(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpointerup(&self) -> JsNullable<JsValue>

Source

pub fn set_onpointerup(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpointerover(&self) -> JsNullable<JsValue>

Source

pub fn set_onpointerover(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpointerout(&self) -> JsNullable<JsValue>

Source

pub fn set_onpointerout(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpointermove(&self) -> JsNullable<JsValue>

Source

pub fn set_onpointermove(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpointerleave(&self) -> JsNullable<JsValue>

Source

pub fn set_onpointerleave(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpointerenter(&self) -> JsNullable<JsValue>

Source

pub fn set_onpointerenter(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpointerdown(&self) -> JsNullable<JsValue>

Source

pub fn set_onpointerdown(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpointercancel(&self) -> JsNullable<JsValue>

Source

pub fn set_onpointercancel(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onplaying(&self) -> JsNullable<JsValue>

Source

pub fn set_onplaying(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onplay(&self) -> JsNullable<JsValue>

Source

pub fn set_onplay(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpause(&self) -> JsNullable<JsValue>

Source

pub fn set_onpause(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onpaste(&self) -> JsNullable<JsValue>

Source

pub fn set_onpaste(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onmouseup(&self) -> JsNullable<JsValue>

Source

pub fn set_onmouseup(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onmouseover(&self) -> JsNullable<JsValue>

Source

pub fn set_onmouseover(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onmouseout(&self) -> JsNullable<JsValue>

Source

pub fn set_onmouseout(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onmousemove(&self) -> JsNullable<JsValue>

Source

pub fn set_onmousemove(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onmouseleave(&self) -> JsNullable<JsValue>

Source

pub fn set_onmouseleave(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onmouseenter(&self) -> JsNullable<JsValue>

Source

pub fn set_onmouseenter(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onmousedown(&self) -> JsNullable<JsValue>

Source

pub fn set_onmousedown(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onlostpointercapture(&self) -> JsNullable<JsValue>

Source

pub fn set_onlostpointercapture(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onloadstart(&self) -> JsNullable<JsValue>

Source

pub fn set_onloadstart(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onloadedmetadata(&self) -> JsNullable<JsValue>

Source

pub fn set_onloadedmetadata(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onloadeddata(&self) -> JsNullable<JsValue>

Source

pub fn set_onloadeddata(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onload(&self) -> JsNullable<JsValue>

Source

pub fn set_onload(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onkeyup(&self) -> JsNullable<JsValue>

Source

pub fn set_onkeyup(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onkeypress(&self) -> JsNullable<JsValue>

Source

pub fn set_onkeypress(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onkeydown(&self) -> JsNullable<JsValue>

Source

pub fn set_onkeydown(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_oninvalid(&self) -> JsNullable<JsValue>

Source

pub fn set_oninvalid(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_oninput(&self) -> JsNullable<JsValue>

Source

pub fn set_oninput(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ongotpointercapture(&self) -> JsNullable<JsValue>

Source

pub fn set_ongotpointercapture(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onformdata(&self) -> JsNullable<JsValue>

Source

pub fn set_onformdata(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onfocus(&self) -> JsNullable<JsValue>

Source

pub fn set_onfocus(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onerror(&self) -> JsNullable<OnErrorEventHandlerNonNull>

Source

pub fn set_onerror( &self, value: &dyn ToJs<JsNullable<OnErrorEventHandlerNonNull>>, )

Source

pub fn get_onended(&self) -> JsNullable<JsValue>

Source

pub fn set_onended(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onemptied(&self) -> JsNullable<JsValue>

Source

pub fn set_onemptied(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondurationchange(&self) -> JsNullable<JsValue>

Source

pub fn set_ondurationchange(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondrop(&self) -> JsNullable<JsValue>

Source

pub fn set_ondrop(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondragstart(&self) -> JsNullable<JsValue>

Source

pub fn set_ondragstart(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondragover(&self) -> JsNullable<JsValue>

Source

pub fn set_ondragover(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondragleave(&self) -> JsNullable<JsValue>

Source

pub fn set_ondragleave(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondragenter(&self) -> JsNullable<JsValue>

Source

pub fn set_ondragenter(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondragend(&self) -> JsNullable<JsValue>

Source

pub fn set_ondragend(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondrag(&self) -> JsNullable<JsValue>

Source

pub fn set_ondrag(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondblclick(&self) -> JsNullable<JsValue>

Source

pub fn set_ondblclick(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_oncut(&self) -> JsNullable<JsValue>

Source

pub fn set_oncut(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_oncuechange(&self) -> JsNullable<JsValue>

Source

pub fn set_oncuechange(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_oncopy(&self) -> JsNullable<JsValue>

Source

pub fn set_oncopy(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_oncontextmenu(&self) -> JsNullable<JsValue>

Source

pub fn set_oncontextmenu(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onclose(&self) -> JsNullable<JsValue>

Source

pub fn set_onclose(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onclick(&self) -> JsNullable<JsValue>

Source

pub fn set_onclick(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onchange(&self) -> JsNullable<JsValue>

Source

pub fn set_onchange(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_oncanplaythrough(&self) -> JsNullable<JsValue>

Source

pub fn set_oncanplaythrough(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_oncanplay(&self) -> JsNullable<JsValue>

Source

pub fn set_oncanplay(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_oncancel(&self) -> JsNullable<JsValue>

Source

pub fn set_oncancel(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onblur(&self) -> JsNullable<JsValue>

Source

pub fn set_onblur(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onbeforeinput(&self) -> JsNullable<JsValue>

Source

pub fn set_onbeforeinput(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onauxclick(&self) -> JsNullable<JsValue>

Source

pub fn set_onauxclick(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onanimationstart(&self) -> JsNullable<JsValue>

Source

pub fn set_onanimationstart(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onanimationiteration(&self) -> JsNullable<JsValue>

Source

pub fn set_onanimationiteration(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onanimationend(&self) -> JsNullable<JsValue>

Source

pub fn set_onanimationend(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onanimationcancel(&self) -> JsNullable<JsValue>

Source

pub fn set_onanimationcancel(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_onabort(&self) -> JsNullable<JsValue>

Source

pub fn set_onabort(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_window(&self) -> JsValue

Source

pub fn set_window(&self, value: &dyn ToJs<JsValue>)

Source

pub fn get_visual_viewport(&self) -> JsNullable<VisualViewport>

Source

pub fn set_visual_viewport(&self, value: &dyn ToJs<JsNullable<VisualViewport>>)

Source

pub fn get_top(&self) -> JsNullable<Window>

Source

pub fn set_top(&self, value: &dyn ToJs<JsNullable<Window>>)

Source

pub fn get_toolbar(&self) -> BarProp

Source

pub fn set_toolbar(&self, value: &BarProp)

Source

pub fn get_statusbar(&self) -> BarProp

Source

pub fn set_statusbar(&self, value: &BarProp)

Source

pub fn get_status(&self) -> JsString

Source

pub fn set_status(&self, value: &dyn ToJs<JsString>)

Source

pub fn get_speech_synthesis(&self) -> SpeechSynthesis

Source

pub fn set_speech_synthesis(&self, value: &SpeechSynthesis)

Source

pub fn get_self(&self) -> JsValue

Source

pub fn set_self(&self, value: &dyn ToJs<JsValue>)

Source

pub fn get_scrollbars(&self) -> BarProp

Source

pub fn set_scrollbars(&self, value: &BarProp)

Source

pub fn get_scroll_y(&self) -> JsNumber

Source

pub fn set_scroll_y(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_scroll_x(&self) -> JsNumber

Source

pub fn set_scroll_x(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_screen_y(&self) -> JsNumber

Source

pub fn set_screen_y(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_screen_x(&self) -> JsNumber

Source

pub fn set_screen_x(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_screen_top(&self) -> JsNumber

Source

pub fn set_screen_top(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_screen_left(&self) -> JsNumber

Source

pub fn set_screen_left(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_screen(&self) -> Screen

Source

pub fn set_screen(&self, value: &Screen)

Source

pub fn get_personalbar(&self) -> BarProp

Source

pub fn set_personalbar(&self, value: &BarProp)

Source

pub fn get_parent(&self) -> Window

Source

pub fn set_parent(&self, value: &dyn ToJs<Window>)

Source

pub fn get_page_yoffset(&self) -> JsNumber

Source

pub fn set_page_yoffset(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_page_xoffset(&self) -> JsNumber

Source

pub fn set_page_xoffset(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_outer_width(&self) -> JsNumber

Source

pub fn set_outer_width(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_outer_height(&self) -> JsNumber

Source

pub fn set_outer_height(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_orientation(&self) -> JsNumber

Source

pub fn set_orientation(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_opener(&self) -> JsValue

Source

pub fn set_opener(&self, value: &dyn ToJs<JsValue>)

Source

pub fn get_onorientationchange(&self) -> JsNullable<JsValue>

Source

pub fn set_onorientationchange(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondeviceorientation(&self) -> JsNullable<JsValue>

Source

pub fn set_ondeviceorientation(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_ondevicemotion(&self) -> JsNullable<JsValue>

Source

pub fn set_ondevicemotion(&self, value: &dyn ToJs<JsNullable<JsValue>>)

Source

pub fn get_navigator(&self) -> Navigator

Source

pub fn set_navigator(&self, value: &Navigator)

Source

pub fn get_name(&self) -> JsString

Source

pub fn set_name(&self, value: &dyn ToJs<JsString>)

Source

pub fn get_menubar(&self) -> BarProp

Source

pub fn set_menubar(&self, value: &BarProp)

Source

pub fn get_locationbar(&self) -> BarProp

Source

pub fn set_locationbar(&self, value: &BarProp)

Source

pub fn get_length(&self) -> JsNumber

Source

pub fn set_length(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_inner_width(&self) -> JsNumber

Source

pub fn set_inner_width(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_inner_height(&self) -> JsNumber

Source

pub fn set_inner_height(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_history(&self) -> History

Source

pub fn set_history(&self, value: &History)

Source

pub fn get_frames(&self) -> Window

Source

pub fn set_frames(&self, value: &dyn ToJs<Window>)

Source

pub fn get_frame_element(&self) -> JsNullable<Element>

Source

pub fn set_frame_element(&self, value: &dyn ToJs<JsNullable<Element>>)

Source

pub fn get_external(&self) -> External

Source

pub fn set_external(&self, value: &External)

Source

pub fn get_event(&self) -> JsNullable<Event>

Source

pub fn set_event(&self, value: &dyn ToJs<JsNullable<Event>>)

Source

pub fn get_document(&self) -> Document

Source

pub fn set_document(&self, value: &Document)

Source

pub fn get_device_pixel_ratio(&self) -> JsNumber

Source

pub fn set_device_pixel_ratio(&self, value: &dyn ToJs<JsNumber>)

Source

pub fn get_custom_elements(&self) -> CustomElementRegistry

Source

pub fn set_custom_elements(&self, value: &CustomElementRegistry)

Source

pub fn get_closed(&self) -> JsBoolean

Source

pub fn set_closed(&self, value: &dyn ToJs<JsBoolean>)

Source

pub fn get_client_information(&self) -> Navigator

Source

pub fn set_client_information(&self, value: &Navigator)

Source

pub fn get_prototype(browser: &Browser) -> Window

Source

pub fn set_prototype(browser: &Browser, value: &Window)

Source

pub fn get_location(&self) -> Location

Source

pub fn set_location(&self, value: &dyn ToJs<JsValue>)

Methods from Deref<Target = EventTarget>§

Source

pub fn dispatch_event(&self, event: &Event) -> JsBoolean

Source

pub fn remove_event_listener( &self, type_: &dyn ToJs<JsString>, callback: &dyn ToJs<JsNullable<JsValue>>, options: &dyn ToJs<JsNullable<JsValue>>, ) -> JsNullish

Source

pub fn add_event_listener( &self, type_: &dyn ToJs<JsString>, callback: &dyn ToJs<JsNullable<JsValue>>, options: &dyn ToJs<JsNullable<JsValue>>, ) -> JsNullish

Methods from Deref<Target = JsObject>§

Source

pub fn js_get_field(&self, property: &dyn UseInJsCode) -> JsValue

Get a field value of in this object.

WSDOM provides built-in getters so you should use that instead when possible.

Use js_get_field only when needed

fn example(browser: Browser) {
    // you can get `window["location"]["href"]` like this
    let href: JsValue = wsdom::dom::location(&browser).js_get_field(&"href");

    // but you should use built-in getters instead
    let href: JsString = wsdom::dom::location(&browser).get_href();
}
Source

pub fn js_set_field(&self, property: &dyn UseInJsCode, value: &dyn UseInJsCode)

Set a field value of in this object.

WSDOM provides built-in setters so you should use that instead when possible.

Use js_set_field only when needed

fn example(browser: Browser) {
    // you can set `window["location"]["href"]` like this
    wsdom::dom::location(&browser).js_set_field(&"href", &"https://example.com/");

    // but you should use built-in setters instead
    wsdom::dom::location(&browser).set_href(&"https://example.com");
}
Source

pub fn js_call_method<'a>( &'a self, method_name: &'a str, args: impl IntoIterator<Item = &'a dyn UseInJsCode>, last_arg_variadic: bool, ) -> JsValue

Call a method on this object.

Most types in WSDOM already come with safe Rust wrappers for their methods, so you should use those instead.

fn example(browser: &Browser) {
    let console = wsdom::dom::console(browser);
    // you can call console.log like this
    console.js_call_method("log", [&"hello" as &_], false);
     
    // but the better way is to use
    wsdom::dom::console(&browser).log(&[&"Hello" as &_]);
}

Be aware that the first argument (method_name) is NOT escaped.

Set last_arg_variadic to true if you want to “spread” the last argument as obj.method(arg1, arg2, ...arg3).

Source

pub fn js_call_self<'a>( &'a self, args: impl IntoIterator<Item = &'a dyn UseInJsCode>, last_arg_variadic: bool, ) -> JsValue

Call this object: obj().

Most types in WSDOM already come with safe Rust wrappers for their methods, so you should use those instead.

Methods from Deref<Target = JsValue>§

Source

pub fn browser(&self) -> &Browser

Source

pub fn retrieve_json(&self) -> RetrieveFuture<'_, Value>

Retrive this value from the JS side to the Rust side. Returns Future whose output is a serde_json::Value.

§use wsdom::dom::Browser
§use wsdom::dom::HTMLInputElement;

async fn example(input: &HTMLInputElement) { let _val = input.get_value().retrieve_json().await; }

Trait Implementations§

Source§

impl AsRef<AnimationFrameProvider> for Window

Source§

fn as_ref(&self) -> &AnimationFrameProvider

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<EventTarget> for Window

Source§

fn as_ref(&self) -> &EventTarget

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<GlobalEventHandlers> for Window

Source§

fn as_ref(&self) -> &GlobalEventHandlers

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<JsObject> for Window

Source§

fn as_ref(&self) -> &JsObject

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<JsValue> for Window

Source§

fn as_ref(&self) -> &JsValue

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<Window> for Window

Source§

fn as_ref(&self) -> &Self

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<WindowEventHandlers> for Window

Source§

fn as_ref(&self) -> &WindowEventHandlers

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<WindowLocalStorage> for Window

Source§

fn as_ref(&self) -> &WindowLocalStorage

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<WindowOrWorkerGlobalScope> for Window

Source§

fn as_ref(&self) -> &WindowOrWorkerGlobalScope

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl AsRef<WindowSessionStorage> for Window

Source§

fn as_ref(&self) -> &WindowSessionStorage

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl Clone for Window

Source§

fn clone(&self) -> Window

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Deref for Window

Source§

type Target = EventTarget

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl Into<AnimationFrameProvider> for Window

Source§

fn into(self) -> AnimationFrameProvider

Converts this type into the (usually inferred) input type.
Source§

impl Into<EventTarget> for Window

Source§

fn into(self) -> EventTarget

Converts this type into the (usually inferred) input type.
Source§

impl Into<GlobalEventHandlers> for Window

Source§

fn into(self) -> GlobalEventHandlers

Converts this type into the (usually inferred) input type.
Source§

impl Into<JsObject> for Window

Source§

fn into(self) -> JsObject

Converts this type into the (usually inferred) input type.
Source§

impl Into<JsValue> for Window

Source§

fn into(self) -> JsValue

Converts this type into the (usually inferred) input type.
Source§

impl Into<WindowEventHandlers> for Window

Source§

fn into(self) -> WindowEventHandlers

Converts this type into the (usually inferred) input type.
Source§

impl Into<WindowLocalStorage> for Window

Source§

fn into(self) -> WindowLocalStorage

Converts this type into the (usually inferred) input type.
Source§

impl Into<WindowOrWorkerGlobalScope> for Window

Source§

fn into(self) -> WindowOrWorkerGlobalScope

Converts this type into the (usually inferred) input type.
Source§

impl Into<WindowSessionStorage> for Window

Source§

fn into(self) -> WindowSessionStorage

Converts this type into the (usually inferred) input type.
Source§

impl JsCast for Window

Source§

fn unchecked_from_js(val: JsValue) -> Self

Source§

fn unchecked_from_js_ref(val: &JsValue) -> &Self

Source§

fn unchecked_into<T>(self) -> T
where T: JsCast,

Source§

fn unchecked_ref<T>(&self) -> &T
where T: JsCast,

Source§

impl RefCast for Window

Source§

type From = JsValue

Source§

fn ref_cast(_from: &Self::From) -> &Self

Source§

fn ref_cast_mut(_from: &mut Self::From) -> &mut Self

Source§

impl UseInJsCode for Window

Source§

fn serialize_to(&self, buf: &mut Formatter<'_>) -> Result

Auto Trait Implementations§

§

impl Freeze for Window

§

impl RefUnwindSafe for Window

§

impl Send for Window

§

impl Sync for Window

§

impl Unpin for Window

§

impl UnwindSafe for Window

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> ToJs<T> for T
where T: UseInJsCode + ?Sized,