#[repr(C)]
pub struct WindowProxy {
Show 15 fields reflector: Reflector, browsing_context_id: BrowsingContextId, opener: Option<BrowsingContextId>, top_level_browsing_context_id: TopLevelBrowsingContextId, name: DomRefCell<DOMString>, currently_active: Cell<Option<PipelineId>>, discarded: Cell<bool>, disowned: Cell<bool>, is_closing: Cell<bool>, frame_element: Option<Dom<Element>>, parent: Option<Dom<WindowProxy>>, delaying_load_events_mode: Cell<bool>, creator_base_url: Option<ServoUrl>, creator_url: Option<ServoUrl>, creator_origin: Option<ImmutableOrigin>,
}

Fields

reflector: Reflector

The JS WindowProxy object. Unlike other reflectors, we mutate this field because we have to brain-transplant the reflector when the WindowProxy changes Window.

browsing_context_id: BrowsingContextId

The id of the browsing context. In the case that this is a nested browsing context, this is the id of the container.

opener: Option<BrowsingContextId>top_level_browsing_context_id: TopLevelBrowsingContextId

The frame id of the top-level ancestor browsing context. In the case that this is a top-level window, this is our id.

name: DomRefCell<DOMString>

The name of the browsing context (sometimes, but not always, equal to the name of a container element)

currently_active: Cell<Option<PipelineId>>

The pipeline id of the currently active document. May be None, when the currently active document is in another script thread. We do not try to keep the pipeline id for documents in other threads, as this would require the constellation notifying many script threads about the change, which could be expensive.

discarded: Cell<bool>

Has the browsing context been discarded?

disowned: Cell<bool>

Has the browsing context been disowned?

is_closing: Cell<bool>

https://html.spec.whatwg.org/multipage/#is-closing

frame_element: Option<Dom<Element>>

The containing iframe element, if this is a same-origin iframe

parent: Option<Dom<WindowProxy>>

The parent browsing context’s window proxy, if this is a nested browsing context

delaying_load_events_mode: Cell<bool>

https://html.spec.whatwg.org/multipage/#delaying-load-events-mode

creator_base_url: Option<ServoUrl>

The creator browsing context’s base url.

creator_url: Option<ServoUrl>

The creator browsing context’s url.

creator_origin: Option<ImmutableOrigin>

The creator browsing context’s origin.

Implementations

https://html.spec.whatwg.org/multipage/#delaying-load-events-mode

https://html.spec.whatwg.org/multipage/#delaying-load-events-mode

https://html.spec.whatwg.org/multipage/#delaying-load-events-mode

https://html.spec.whatwg.org/multipage/#dom-window-close Step 3.1, set BCs is_closing to true.

https://html.spec.whatwg.org/multipage/#is-closing

https://html.spec.whatwg.org/multipage/#creator-base-url

https://html.spec.whatwg.org/multipage/#creator-url

https://html.spec.whatwg.org/multipage/#creator-origin

Change the Window that this WindowProxy resolves to.

Trait Implementations

Returns the receiver’s reflector.
Returns the global scope of the realm that the DomObject was created in.

This is used in a type assertion to ensure that the source and webidls agree as to what the parent type is

Trace self.
Measure the heap usage of all descendant heap-allocated structures, but not the space taken up by the value itself. Read more
Initializes the Reflector
Convert self to a JSVal. JSAPI failure causes a panic.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Convert
Convert
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more