enum WindowOrDissimilarOriginWindow {
Window(DomRoot<Window>),
DissimilarOriginWindow(DomRoot<DissimilarOriginWindow>),
}Expand description
A wrapper class for either a Window or DissimilarOriginWindow that
exposes a consistent interface for both of them.
Variants§
Implementations§
Source§impl WindowOrDissimilarOriginWindow
impl WindowOrDissimilarOriginWindow
fn new(cx: &mut JSContext, handle_object: HandleObject<'_>) -> Self
fn global_scope(&self) -> DomRoot<GlobalScope>
fn window_proxy(&self) -> DomRoot<WindowProxy>
fn cross_origin_properties(&self) -> &'static CrossOriginProperties
fn iframe_count(&self) -> u32
https://html.spec.whatwg.org/multipage/#document-tree-child-navigable-target-name-property-set
The document-tree child navigable target name property set of a Window object window is the return value of running these steps:
Step 1. Let children be the document-tree child navigables of window’s associated Document. Step 2. Let firstNamedChildren be an empty ordered set. Step 3. For each navigable of children: Step 3.1. Let name be navigable’s target name. Step 3.2. If name is the empty string, then continue. Step 3.3. If firstNamedChildren contains a navigable whose target name is name, then continue. Step 3.4. Append navigable to firstNamedChildren. Step 4. Let names be an empty ordered set. Step 5. For each navigable of firstNamedChildren: Step 5.1. Let name be navigable’s target name. Step 5.2. If navigable’s active document’s origin is same origin with window’s relevant settings object’s origin, then append name to names. Step 6. Return names.
We don’t implement these steps exactly, but we effectively do them using iterators below.
Auto Trait Implementations§
impl Freeze for WindowOrDissimilarOriginWindow
impl !RefUnwindSafe for WindowOrDissimilarOriginWindow
impl !Send for WindowOrDissimilarOriginWindow
impl !Sync for WindowOrDissimilarOriginWindow
impl Unpin for WindowOrDissimilarOriginWindow
impl UnsafeUnpin for WindowOrDissimilarOriginWindow
impl !UnwindSafe for WindowOrDissimilarOriginWindow
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<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