#[repr(C)]pub struct Window {Show 57 fields
globalscope: GlobalScope,
script_chan: MainThreadScriptChan,
task_manager: TaskManager,
layout: RefCell<Box<dyn Layout>>,
navigator: MutNullableDom<Navigator>,
image_cache: Arc<dyn ImageCache>,
image_cache_chan: Sender<ImageCacheMsg>,
window_proxy: MutNullableDom<WindowProxy>,
document: MutNullableDom<Document>,
location: MutNullableDom<Location>,
history: MutNullableDom<History>,
custom_element_registry: MutNullableDom<CustomElementRegistry>,
performance: MutNullableDom<Performance>,
navigation_start: Cell<CrossProcessInstant>,
screen: MutNullableDom<Screen>,
session_storage: MutNullableDom<Storage>,
local_storage: MutNullableDom<Storage>,
status: DomRefCell<DOMString>,
devtools_markers: DomRefCell<HashSet<TimelineMarkerType>>,
devtools_marker_sender: DomRefCell<Option<IpcSender<Option<TimelineMarker>>>>,
unhandled_resize_event: DomRefCell<Option<(WindowSizeData, WindowSizeType)>>,
parent_info: Option<PipelineId>,
dom_static: GlobalStaticData,
js_runtime: DomRefCell<Option<Rc<Runtime>>>,
window_size: Cell<WindowSizeData>,
bluetooth_thread: IpcSender<BluetoothRequest>,
bluetooth_extra_permission_data: BluetoothExtraPermissionData,
page_clip_rect: Cell<Rect<Au>>,
suppress_reflow: Cell<bool>,
pending_reflow_count: Cell<u32>,
webdriver_script_chan: DomRefCell<Option<IpcSender<WebDriverJSResult>>>,
current_state: Cell<WindowState>,
current_viewport: Cell<Rect<Au>>,
error_reporter: CSSErrorReporter,
scroll_offsets: DomRefCell<HashMap<OpaqueNode, Vector2D<f32, LayoutPixel>>>,
media_query_lists: DOMTracker<MediaQueryList>,
test_runner: MutNullableDom<TestRunner>,
webgl_chan: Option<WebGLChan>,
webxr_registry: Registry,
pending_layout_images: DomRefCell<HashMapTracedValues<PendingImageId, Vec<Dom<Node>>>>,
unminified_js_dir: DomRefCell<Option<String>>,
local_script_source: Option<String>,
test_worklet: MutNullableDom<Worklet>,
paint_worklet: MutNullableDom<Worklet>,
webrender_document: DocumentId,
exists_mut_observer: Cell<bool>,
compositor_api: CrossProcessCompositorApi,
has_sent_idle_message: Cell<bool>,
relayout_event: bool,
prepare_for_screenshot: bool,
unminify_js: bool,
userscripts_path: Option<String>,
replace_surrogates: bool,
player_context: WindowGLContext,
throttled: Cell<bool>,
layout_marker: DomRefCell<Rc<Cell<bool>>>,
current_event: DomRefCell<Option<Dom<Event>>>,
}
Fields§
§globalscope: GlobalScope
§script_chan: MainThreadScriptChan
§task_manager: TaskManager
§layout: RefCell<Box<dyn Layout>>
§image_cache: Arc<dyn ImageCache>
§image_cache_chan: Sender<ImageCacheMsg>
§window_proxy: MutNullableDom<WindowProxy>
§document: MutNullableDom<Document>
§location: MutNullableDom<Location>
§history: MutNullableDom<History>
§custom_element_registry: MutNullableDom<CustomElementRegistry>
§performance: MutNullableDom<Performance>
§screen: MutNullableDom<Screen>
§session_storage: MutNullableDom<Storage>
§local_storage: MutNullableDom<Storage>
§status: DomRefCell<DOMString>
§devtools_markers: DomRefCell<HashSet<TimelineMarkerType>>
For sending timeline markers. Will be ignored if no devtools server
devtools_marker_sender: DomRefCell<Option<IpcSender<Option<TimelineMarker>>>>
§unhandled_resize_event: DomRefCell<Option<(WindowSizeData, WindowSizeType)>>
Most recent unhandled resize event, if any.
parent_info: Option<PipelineId>
Parent id associated with this page, if any.
dom_static: GlobalStaticData
Global static data related to the DOM.
js_runtime: DomRefCell<Option<Rc<Runtime>>>
The JavaScript runtime.
window_size: Cell<WindowSizeData>
The current size of the window, in pixels.
bluetooth_thread: IpcSender<BluetoothRequest>
A handle for communicating messages to the bluetooth thread.
bluetooth_extra_permission_data: BluetoothExtraPermissionData
§page_clip_rect: Cell<Rect<Au>>
An enlarged rectangle around the page contents visible in the viewport, used to prevent creating display list items for content that is far away from the viewport.
suppress_reflow: Cell<bool>
Flag to suppress reflows. The first reflow will come either with RefreshTick or with FirstLoad. Until those first reflows, we want to suppress others like MissingExplicitReflow.
pending_reflow_count: Cell<u32>
A counter of the number of pending reflows for this window.
webdriver_script_chan: DomRefCell<Option<IpcSender<WebDriverJSResult>>>
A channel for communicating results of async scripts back to the webdriver server
current_state: Cell<WindowState>
The current state of the window object
current_viewport: Cell<Rect<Au>>
§error_reporter: CSSErrorReporter
§scroll_offsets: DomRefCell<HashMap<OpaqueNode, Vector2D<f32, LayoutPixel>>>
A list of scroll offsets for each scrollable element.
media_query_lists: DOMTracker<MediaQueryList>
All the MediaQueryLists we need to update
test_runner: MutNullableDom<TestRunner>
§webgl_chan: Option<WebGLChan>
A handle for communicating messages to the WebGL thread, if available.
webxr_registry: Registry
§pending_layout_images: DomRefCell<HashMapTracedValues<PendingImageId, Vec<Dom<Node>>>>
All of the elements that have an outstanding image request that was initiated by layout during a reflow. They are stored in the script thread to ensure that the element can be marked dirty when the image data becomes available at some point in the future.
unminified_js_dir: DomRefCell<Option<String>>
Directory to store unminified scripts for this window if unminify-js opt is enabled.
local_script_source: Option<String>
Directory with stored unminified scripts
test_worklet: MutNullableDom<Worklet>
Worklets
paint_worklet: MutNullableDom<Worklet>
§webrender_document: DocumentId
The Webrender Document id associated with this window.
exists_mut_observer: Cell<bool>
Flag to identify whether mutation observers are present(true)/absent(false)
compositor_api: CrossProcessCompositorApi
Cross-process access to the compositor.
has_sent_idle_message: Cell<bool>
Indicate whether a SetDocumentStatus message has been sent after a reflow is complete. It is used to avoid sending idle message more than once, which is unneccessary.
relayout_event: bool
Emits notifications when there is a relayout.
prepare_for_screenshot: bool
True if it is safe to write to the image.
unminify_js: bool
Unminify Javascript.
userscripts_path: Option<String>
Where to load userscripts from, if any. An empty string will load from the resources/user-agent-js directory, and if the option isn’t passed userscripts won’t be loaded.
replace_surrogates: bool
Replace unpaired surrogates in DOM strings with U+FFFD. See https://github.com/servo/servo/issues/6564
player_context: WindowGLContext
Window’s GL context from application
throttled: Cell<bool>
§layout_marker: DomRefCell<Rc<Cell<bool>>>
A shared marker for the validity of any cached layout values. A value of true indicates that any such values remain valid; any new layout that invalidates those values will cause the marker to be set to false.
current_event: DomRefCell<Option<Dom<Event>>>
Implementations§
source§impl Window
impl Window
fn __assert_parent_type(&self)
source§impl Window
impl Window
pub fn task_manager(&self) -> &TaskManager
pub fn layout(&self) -> Ref<'_, Box<dyn Layout>>
pub fn layout_mut(&self) -> RefMut<'_, Box<dyn Layout>>
pub fn get_exists_mut_observer(&self) -> bool
pub fn set_exists_mut_observer(&self)
pub fn clear_js_runtime_for_script_deallocation(&self)
sourcepub fn discard_browsing_context(&self)
pub fn discard_browsing_context(&self)
A convenience method for https://html.spec.whatwg.org/multipage/#a-browsing-context-is-discarded
sourcepub fn ignore_all_tasks(&self)
pub fn ignore_all_tasks(&self)
Cancel all current, and ignore all subsequently queued, tasks.
sourcepub fn time_profiler_chan(&self) -> &TimeProfilerChan
pub fn time_profiler_chan(&self) -> &TimeProfilerChan
Get a sender to the time profiler thread.
pub fn origin(&self) -> &MutableOrigin
pub fn get_cx(&self) -> JSContext
pub fn get_js_runtime(&self) -> Ref<'_, Option<Rc<Runtime>>>
pub fn main_thread_script_chan(&self) -> &Sender<MainThreadScriptMsg>
pub fn parent_info(&self) -> Option<PipelineId>
pub fn new_script_pair( &self, ) -> (Box<dyn ScriptChan + Send>, Box<dyn ScriptPort + Send>)
pub fn image_cache(&self) -> Arc<dyn ImageCache>
sourcepub fn window_proxy(&self) -> Root<Dom<WindowProxy>>
pub fn window_proxy(&self) -> Root<Dom<WindowProxy>>
This can panic if it is called after the browsing context has been discarded
sourcepub fn undiscarded_window_proxy(&self) -> Option<Root<Dom<WindowProxy>>>
pub fn undiscarded_window_proxy(&self) -> Option<Root<Dom<WindowProxy>>>
Returns the window proxy if it has not been discarded. https://html.spec.whatwg.org/multipage/#a-browsing-context-is-discarded
pub fn bluetooth_thread(&self) -> IpcSender<BluetoothRequest>
pub fn bluetooth_extra_permission_data(&self) -> &BluetoothExtraPermissionData
pub fn css_error_reporter(&self) -> Option<&dyn ParseErrorReporter>
sourcepub fn set_scroll_offsets(
&self,
offsets: HashMap<OpaqueNode, Vector2D<f32, LayoutPixel>>,
)
pub fn set_scroll_offsets( &self, offsets: HashMap<OpaqueNode, Vector2D<f32, LayoutPixel>>, )
Sets a new list of scroll offsets.
This is called when layout gives us new ones and WebRender is in use.
pub fn current_viewport(&self) -> UntypedRect<Au>
pub(crate) fn webgl_chan(&self) -> Option<WebGLCommandSender>
pub fn webxr_registry(&self) -> Registry
fn new_paint_worklet(&self) -> Root<Dom<Worklet>>
pub fn pending_image_notification(&self, response: PendingImageResponse)
pub fn compositor_api(&self) -> &CrossProcessCompositorApi
pub fn get_userscripts_path(&self) -> Option<String>
pub fn replace_surrogates(&self) -> bool
pub fn unminify_js(&self) -> bool
pub fn get_player_context(&self) -> WindowGLContext
pub fn dispatch_event_with_target_override(&self, event: &Event) -> EventStatus
source§impl Window
impl Window
pub fn create_named_properties_object( cx: JSContext, proto: HandleObject<'_>, object: MutableHandleObject<'_>, )
pub(crate) fn set_current_event( &self, event: Option<&Event>, ) -> Option<Root<Dom<Event>>>
sourcefn post_message_impl(
&self,
target_origin: &USVString,
source_origin: ImmutableOrigin,
source: &Window,
cx: JSContext,
message: HandleValue<'_>,
transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>,
) -> Result<(), Error>
fn post_message_impl( &self, target_origin: &USVString, source_origin: ImmutableOrigin, source: &Window, cx: JSContext, message: HandleValue<'_>, transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>, ) -> Result<(), Error>
pub fn paint_worklet(&self) -> Root<Dom<Worklet>>
pub fn has_document(&self) -> bool
sourcepub fn cancel_all_tasks(&self)
pub fn cancel_all_tasks(&self)
Cancels all the tasks associated with that window.
This sets the current task_manager.task_cancellers
sentinel value to
true
and replaces it with a brand new one for future tasks.
sourcepub fn cancel_all_tasks_from_source(&self, task_source_name: TaskSourceName)
pub fn cancel_all_tasks_from_source(&self, task_source_name: TaskSourceName)
Cancels all the tasks from a given task source.
This sets the current sentinel value to
true
and replaces it with a brand new one for future tasks.
pub fn clear_js_runtime(&self)
sourcepub fn scroll(&self, x_: f64, y_: f64, behavior: ScrollBehavior)
pub fn scroll(&self, x_: f64, y_: f64, behavior: ScrollBehavior)
sourcepub fn perform_a_scroll(
&self,
x: f32,
y: f32,
scroll_id: ExternalScrollId,
_behavior: ScrollBehavior,
_element: Option<&Element>,
)
pub fn perform_a_scroll( &self, x: f32, y: f32, scroll_id: ExternalScrollId, _behavior: ScrollBehavior, _element: Option<&Element>, )
pub fn update_viewport_for_scroll(&self, x: f32, y: f32)
pub fn device_pixel_ratio(&self) -> Scale<f32, CSSPixel, DevicePixel>
fn client_window(&self) -> (Size2D<u32, CSSPixel>, Point2D<i32, CSSPixel>)
sourcepub fn advance_animation_clock(&self, delta_ms: i32)
pub fn advance_animation_clock(&self, delta_ms: i32)
Prepares to tick animations and then does a reflow which also advances the layout animation clock.
sourcepub(crate) fn force_reflow(
&self,
reflow_goal: ReflowGoal,
reason: ReflowReason,
condition: Option<ReflowTriggerCondition>,
) -> bool
pub(crate) fn force_reflow( &self, reflow_goal: ReflowGoal, reason: ReflowReason, condition: Option<ReflowTriggerCondition>, ) -> bool
Reflows the page unconditionally if possible and not suppressed. This method will wait for the layout to complete. If there is no window size yet, the page is presumed invisible and no reflow is performed. If reflow is suppressed, no reflow will be performed for ForDisplay goals.
Returns true if layout actually happened, false otherwise.
sourcepub fn reflow(&self, reflow_goal: ReflowGoal, reason: ReflowReason) -> bool
pub fn reflow(&self, reflow_goal: ReflowGoal, reason: ReflowReason) -> bool
Reflows the page if it’s possible to do so and the page is dirty.
Returns true if layout actually happened, false otherwise. This return value is useful for script queries, that wait for a lock that layout might hold if the first layout hasn’t happened yet (which may happen in the only case a query reflow may bail out, that is, if the viewport size is not present). See #11223 for an example of that.
sourcepub(crate) fn update_constellation_epoch(&self)
pub(crate) fn update_constellation_epoch(&self)
If writing a screenshot, synchronously update the layout epoch that it set in the constellation.
pub fn layout_reflow(&self, query_msg: QueryMsg) -> bool
pub fn resolved_font_style_query( &self, node: &Node, value: String, ) -> Option<ServoArc<Font>>
pub fn content_box_query(&self, node: &Node) -> Option<UntypedRect<Au>>
pub fn content_boxes_query(&self, node: &Node) -> Vec<UntypedRect<Au>>
pub fn client_rect_query(&self, node: &Node) -> UntypedRect<i32>
sourcepub fn scrolling_area_query(&self, node: Option<&Node>) -> UntypedRect<i32>
pub fn scrolling_area_query(&self, node: Option<&Node>) -> UntypedRect<i32>
Find the scroll area of the given node, if it is not None. If the node is None, find the scroll area of the viewport.
pub fn scroll_offset_query(&self, node: &Node) -> Vector2D<f32, LayoutPixel>
pub fn scroll_node( &self, node: &Node, x_: f64, y_: f64, behavior: ScrollBehavior, )
pub fn resolved_style_query( &self, element: TrustedNodeAddress, pseudo: Option<PseudoElement>, property: PropertyId, ) -> DOMString
pub fn inner_window_dimensions_query( &self, browsing_context: BrowsingContextId, ) -> Option<Size2D<f32, CSSPixel>>
pub fn offset_parent_query( &self, node: &Node, ) -> (Option<Root<Dom<Element>>>, UntypedRect<Au>)
pub fn text_index_query( &self, node: &Node, point_in_node: UntypedPoint2D<f32>, ) -> Option<usize>
pub fn init_window_proxy(&self, window_proxy: &WindowProxy)
pub fn init_document(&self, document: &Document)
sourcepub fn load_url(
&self,
replace: HistoryEntryReplacement,
force_reload: bool,
load_data: LoadData,
)
pub fn load_url( &self, replace: HistoryEntryReplacement, force_reload: bool, load_data: LoadData, )
Commence a new URL load which will either replace this window or scroll to a fragment.
https://html.spec.whatwg.org/multipage/#navigating-across-documents
pub fn handle_fire_timer(&self, timer_id: TimerEventId)
pub fn set_window_size(&self, size: WindowSizeData)
pub fn window_size(&self) -> WindowSizeData
pub fn get_url(&self) -> ServoUrl
pub fn windowproxy_handler(&self) -> &'static WindowProxyHandler
pub fn get_pending_reflow_count(&self) -> u32
pub fn add_pending_reflow(&self)
pub fn add_resize_event( &self, event: WindowSizeData, event_type: WindowSizeType, )
pub fn take_unhandled_resize_event( &self, ) -> Option<(WindowSizeData, WindowSizeType)>
pub fn set_page_clip_rect_with_new_viewport( &self, viewport: UntypedRect<f32>, ) -> bool
pub fn suspend(&self)
pub fn resume(&self)
pub fn need_emit_timeline_marker( &self, timeline_type: TimelineMarkerType, ) -> bool
pub fn emit_timeline_marker(&self, marker: TimelineMarker)
pub fn set_devtools_timeline_markers( &self, markers: Vec<TimelineMarkerType>, reply: IpcSender<Option<TimelineMarker>>, )
pub fn drop_devtools_timeline_markers(&self, markers: Vec<TimelineMarkerType>)
pub fn set_webdriver_script_chan( &self, chan: Option<IpcSender<WebDriverJSResult>>, )
pub fn is_alive(&self) -> bool
pub fn is_top_level(&self) -> bool
sourcepub fn evaluate_media_queries_and_report_changes(&self)
pub fn evaluate_media_queries_and_report_changes(&self)
Evaluate media query lists and report changes https://drafts.csswg.org/cssom-view/#evaluate-media-queries-and-report-changes
sourcepub fn set_throttled(&self, throttled: bool)
pub fn set_throttled(&self, throttled: bool)
Set whether to use less resources by running timers at a heavily limited rate.
pub fn throttled(&self) -> bool
pub fn unminified_js_dir(&self) -> Option<String>
pub fn local_script_source(&self) -> &Option<String>
pub fn send_to_embedder(&self, msg: EmbedderMsg)
pub fn send_to_constellation(&self, msg: ScriptMsg)
pub fn webrender_document(&self) -> DocumentId
pub fn in_immersive_xr_session(&self) -> bool
source§impl Window
impl Window
pub fn new( runtime: Rc<Runtime>, script_chan: MainThreadScriptChan, task_manager: TaskManager, layout: Box<dyn Layout>, image_cache_chan: Sender<ImageCacheMsg>, image_cache: Arc<dyn ImageCache>, resource_threads: ResourceThreads, bluetooth_thread: IpcSender<BluetoothRequest>, mem_profiler_chan: MemProfilerChan, time_profiler_chan: TimeProfilerChan, devtools_chan: Option<IpcSender<ScriptToDevtoolsControlMsg>>, constellation_chan: ScriptToConstellationChan, control_chan: IpcSender<ConstellationControlMsg>, scheduler_chan: IpcSender<TimerSchedulerMsg>, pipelineid: PipelineId, parent_info: Option<PipelineId>, window_size: WindowSizeData, origin: MutableOrigin, creator_url: ServoUrl, navigation_start: CrossProcessInstant, webgl_chan: Option<WebGLChan>, webxr_registry: Registry, microtask_queue: Rc<MicrotaskQueue>, webrender_document: DocumentId, compositor_api: CrossProcessCompositorApi, relayout_event: bool, prepare_for_screenshot: bool, unminify_js: bool, local_script_source: Option<String>, userscripts_path: Option<String>, is_headless: bool, replace_surrogates: bool, user_agent: Cow<'static, str>, player_context: WindowGLContext, gpu_id_hub: Arc<IdentityHub>, inherited_secure_context: Option<bool>, ) -> Root<Dom<Self>>
pub fn pipeline_id(&self) -> PipelineId
sourcepub fn cache_layout_value<T>(&self, value: T) -> LayoutValue<T>where
T: Copy + MallocSizeOf,
pub fn cache_layout_value<T>(&self, value: T) -> LayoutValue<T>where
T: Copy + MallocSizeOf,
Create a new cached instance of the given value.
source§impl Window
impl Window
pub fn post_message( &self, target_origin: Option<ImmutableOrigin>, source_origin: ImmutableOrigin, source: &WindowProxy, data: StructuredSerializedData, )
Trait Implementations§
source§impl Castable for Window
impl Castable for Window
source§impl HasParent for Window
impl HasParent for Window
source§fn as_parent(&self) -> &GlobalScope
fn as_parent(&self) -> &GlobalScope
This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is
type Parent = GlobalScope
source§impl IDLInterface for Window
impl IDLInterface for Window
source§impl MallocSizeOf for Window
impl MallocSizeOf for Window
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
source§impl MutDomObject for Window
impl MutDomObject for Window
source§unsafe fn init_reflector(&self, obj: *mut JSObject)
unsafe fn init_reflector(&self, obj: *mut JSObject)
source§impl PartialEq for Window
impl PartialEq for Window
source§impl ToJSValConvertible for Window
impl ToJSValConvertible for Window
source§impl WindowMethods for Window
impl WindowMethods for Window
source§fn RequestAnimationFrame(&self, callback: Rc<FrameRequestCallback>) -> u32
fn RequestAnimationFrame(&self, callback: Rc<FrameRequestCallback>) -> u32
source§fn CancelAnimationFrame(&self, ident: u32)
fn CancelAnimationFrame(&self, ident: u32)
source§fn PostMessage_(
&self,
cx: JSContext,
message: HandleValue<'_>,
options: RootedTraceableBox<WindowPostMessageOptions>,
) -> Result<(), Error>
fn PostMessage_( &self, cx: JSContext, message: HandleValue<'_>, options: RootedTraceableBox<WindowPostMessageOptions>, ) -> Result<(), Error>
source§fn StructuredClone(
&self,
cx: JSContext,
value: HandleValue<'_>,
options: RootedTraceableBox<StructuredSerializeOptions>,
) -> Result<JSVal, Error>
fn StructuredClone( &self, cx: JSContext, value: HandleValue<'_>, options: RootedTraceableBox<StructuredSerializeOptions>, ) -> Result<JSVal, Error>
fn Alert_(&self)
fn Alert(&self, s: DOMString)
fn Confirm(&self, s: DOMString) -> bool
fn Prompt(&self, message: DOMString, default: DOMString) -> Option<DOMString>
fn Stop(&self, can_gc: CanGc)
fn Open( &self, url: USVString, target: DOMString, features: DOMString, ) -> Result<Option<Root<Dom<WindowProxy>>>, Error>
fn GetOpener( &self, cx: JSContext, in_realm_proof: InRealm<'_>, ) -> Result<JSVal, Error>
fn SetOpener(&self, cx: JSContext, value: HandleValue<'_>) -> Result<(), Error>
fn Closed(&self) -> bool
fn Close(&self)
fn Document(&self) -> Root<Dom<Document>>
fn History(&self) -> Root<Dom<History>>
fn CustomElements(&self) -> Root<Dom<CustomElementRegistry>>
fn Location(&self) -> Root<Dom<Location>>
fn SessionStorage(&self) -> Root<Dom<Storage>>
fn LocalStorage(&self) -> Root<Dom<Storage>>
fn Crypto(&self) -> Root<Dom<Crypto>>
fn GetFrameElement(&self) -> Option<Root<Dom<Element>>>
fn SetTimeout( &self, _cx: JSContext, callback: StringOrFunction, timeout: i32, args: Vec<HandleValue<'_>>, ) -> i32
fn ClearTimeout(&self, handle: i32)
fn SetInterval( &self, _cx: JSContext, callback: StringOrFunction, timeout: i32, args: Vec<HandleValue<'_>>, ) -> i32
fn ClearInterval(&self, handle: i32)
fn QueueMicrotask(&self, callback: Rc<VoidFunction>)
fn CreateImageBitmap( &self, image: ImageBitmapSource, options: &ImageBitmapOptions, ) -> Rc<Promise>
fn Window(&self) -> Root<Dom<WindowProxy>>
fn Self_(&self) -> Root<Dom<WindowProxy>>
fn Frames(&self) -> Root<Dom<WindowProxy>>
fn Length(&self) -> u32
fn GetParent(&self) -> Option<Root<Dom<WindowProxy>>>
fn GetTop(&self) -> Option<Root<Dom<WindowProxy>>>
fn Performance(&self) -> Root<Dom<Performance>>
fn GetOnblur(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnblur(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnerror(&self) -> Option<Rc<OnErrorEventHandlerNonNull>>
fn SetOnerror(&self, listener: Option<Rc<OnErrorEventHandlerNonNull>>)
fn GetOnfocus(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnfocus(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnload(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnload(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnresize(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnresize(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnscroll(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnscroll(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnabort(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnabort(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnanimationend(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnanimationend(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnanimationiteration(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnanimationiteration(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOncancel(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOncancel(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOncanplay(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOncanplay(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOncanplaythrough(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOncanplaythrough(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnchange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnchange(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnclick(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnclick(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnclose(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnclose(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOncuechange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOncuechange(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOndblclick(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndblclick(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOndrag(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndrag(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOndragend(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndragend(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOndragenter(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndragenter(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOndragexit(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndragexit(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOndragleave(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndragleave(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOndragover(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndragover(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOndragstart(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndragstart(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOndrop(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndrop(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOndurationchange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOndurationchange(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnemptied(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnemptied(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnended(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnended(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnformdata(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnformdata(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOninput(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOninput(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOninvalid(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOninvalid(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnkeydown(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnkeydown(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnkeypress(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnkeypress(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnkeyup(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnkeyup(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnloadeddata(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnloadeddata(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnloadedmetadata(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnloadedmetadata(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnloadstart(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnloadstart(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnmousedown(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmousedown(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnmouseenter(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmouseenter(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnmouseleave(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmouseleave(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnmousemove(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmousemove(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnmouseout(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmouseout(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnmouseover(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmouseover(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnmouseup(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmouseup(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnwheel(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnwheel(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnpause(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnpause(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnplay(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnplay(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnplaying(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnplaying(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnprogress(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnprogress(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnratechange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnratechange(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnreset(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnreset(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnsecuritypolicyviolation(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnsecuritypolicyviolation( &self, listener: Option<Rc<EventHandlerNonNull>>, )
fn GetOnseeked(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnseeked(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnseeking(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnseeking(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnselect(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnselect(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnselectionchange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnselectionchange(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnselectstart(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnselectstart(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnshow(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnshow(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnstalled(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnstalled(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnsubmit(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnsubmit(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnsuspend(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnsuspend(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOntimeupdate(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOntimeupdate(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOntoggle(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOntoggle(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOntransitioncancel(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOntransitioncancel(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOntransitionend(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOntransitionend(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOntransitionrun(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOntransitionrun(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnvolumechange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnvolumechange(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnwaiting(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnwaiting(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnafterprint(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnafterprint(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnbeforeprint(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnbeforeprint(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnbeforeunload(&self) -> Option<Rc<OnBeforeUnloadEventHandlerNonNull>>
fn SetOnbeforeunload( &self, listener: Option<Rc<OnBeforeUnloadEventHandlerNonNull>>, )
fn GetOnhashchange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnhashchange(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnlanguagechange(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnlanguagechange(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnmessage(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmessage(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnmessageerror(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnmessageerror(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnoffline(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnoffline(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnonline(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnonline(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnpagehide(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnpagehide(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnpageshow(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnpageshow(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnpopstate(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnpopstate(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnrejectionhandled(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnrejectionhandled(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnstorage(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnstorage(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnunhandledrejection(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnunhandledrejection(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOnunload(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOnunload(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOngamepadconnected(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOngamepadconnected(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn GetOngamepaddisconnected(&self) -> Option<Rc<EventHandlerNonNull>>
fn SetOngamepaddisconnected(&self, listener: Option<Rc<EventHandlerNonNull>>)
fn Screen(&self) -> Root<Dom<Screen>>
fn Btoa(&self, btoa: DOMString) -> Result<DOMString, Error>
fn Atob(&self, atob: DOMString) -> Result<DOMString, Error>
fn PostMessage( &self, cx: JSContext, message: HandleValue<'_>, target_origin: USVString, transfer: CustomAutoRooterGuard<'_, Vec<*mut JSObject>>, ) -> Result<(), Error>
fn CaptureEvents(&self)
fn ReleaseEvents(&self)
fn Debug(&self, message: DOMString)
fn Gc(&self)
fn Js_backtrace(&self)
fn WebdriverCallback(&self, cx: JSContext, val: HandleValue<'_>)
fn WebdriverTimeout(&self)
fn GetComputedStyle( &self, element: &Element, pseudo: Option<DOMString>, ) -> Root<Dom<CSSStyleDeclaration>>
fn InnerHeight(&self) -> i32
fn InnerWidth(&self) -> i32
fn ScrollX(&self) -> i32
fn PageXOffset(&self) -> i32
fn ScrollY(&self) -> i32
fn PageYOffset(&self) -> i32
fn Scroll(&self, options: &ScrollToOptions)
fn Scroll_(&self, x: f64, y: f64)
fn ScrollTo(&self, options: &ScrollToOptions)
fn ScrollTo_(&self, x: f64, y: f64)
fn ScrollBy(&self, options: &ScrollToOptions)
fn ScrollBy_(&self, x: f64, y: f64)
fn ResizeTo(&self, width: i32, height: i32)
fn ResizeBy(&self, x: i32, y: i32)
fn MoveTo(&self, x: i32, y: i32)
fn MoveBy(&self, x: i32, y: i32)
fn ScreenX(&self) -> i32
fn ScreenY(&self) -> i32
fn OuterHeight(&self) -> i32
fn OuterWidth(&self) -> i32
fn DevicePixelRatio(&self) -> Finite<f64>
fn Status(&self) -> DOMString
fn SetStatus(&self, status: DOMString)
fn MatchMedia(&self, query: DOMString) -> Root<Dom<MediaQueryList>>
fn Fetch( &self, input: RequestOrUSVString, init: RootedTraceableBox<RequestInit>, comp: InRealm<'_>, ) -> Rc<Promise>
fn TestRunner(&self) -> Root<Dom<TestRunner>>
fn RunningAnimationCount(&self) -> u32
fn SetName(&self, name: DOMString)
fn Name(&self) -> DOMString
fn Origin(&self) -> USVString
fn GetSelection(&self) -> Option<Root<Dom<Selection>>>
fn Event(&self, cx: JSContext) -> JSVal
fn IsSecureContext(&self) -> bool
fn NamedGetter( &self, _cx: JSContext, name: DOMString, ) -> Option<NonNull<JSObject>>
fn SupportedPropertyNames(&self) -> Vec<DOMString>
impl DerivedFrom<EventTarget> for Window
impl DerivedFrom<GlobalScope> for Window
impl Eq for Window
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<T> Filterable for T
impl<T> Filterable for T
source§fn filterable(
self,
filter_name: &'static str,
) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
fn filterable( self, filter_name: &'static str, ) -> RequestFilterDataProvider<T, fn(_: DataRequest<'_>) -> bool>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more