Struct script::dom::documentorshadowroot::DocumentOrShadowRoot
source · pub struct DocumentOrShadowRoot {
window: Dom<Window>,
}
Fields§
§window: Dom<Window>
Implementations§
source§impl DocumentOrShadowRoot
impl DocumentOrShadowRoot
pub fn new(window: &Window) -> Self
pub fn nodes_from_point( &self, client_point: &Point2D<f32>, query_type: NodesFromPointQueryType, can_gc: CanGc, ) -> Vec<UntrustedNodeAddress>
pub fn element_from_point( &self, x: Finite<f64>, y: Finite<f64>, document_element: Option<Root<Dom<Element>>>, has_browsing_context: bool, can_gc: CanGc, ) -> Option<Root<Dom<Element>>>
pub fn elements_from_point( &self, x: Finite<f64>, y: Finite<f64>, document_element: Option<Root<Dom<Element>>>, has_browsing_context: bool, can_gc: CanGc, ) -> Vec<Root<Dom<Element>>>
pub fn get_active_element( &self, focused_element: Option<Root<Dom<Element>>>, body: Option<Root<Dom<HTMLElement>>>, document_element: Option<Root<Dom<Element>>>, ) -> Option<Root<Dom<Element>>>
sourcepub fn remove_stylesheet(
owner: &Element,
s: &Arc<Stylesheet>,
stylesheets: StylesheetSetRef<'_, StyleSheetInDocument>,
)
pub fn remove_stylesheet( owner: &Element, s: &Arc<Stylesheet>, stylesheets: StylesheetSetRef<'_, StyleSheetInDocument>, )
Remove a stylesheet owned by owner
from the list of document sheets.
sourcepub fn add_stylesheet(
owner: &Element,
stylesheets: StylesheetSetRef<'_, StyleSheetInDocument>,
sheet: Arc<Stylesheet>,
insertion_point: Option<StyleSheetInDocument>,
style_shared_lock: &StyleSharedRwLock,
)
pub fn add_stylesheet( owner: &Element, stylesheets: StylesheetSetRef<'_, StyleSheetInDocument>, sheet: Arc<Stylesheet>, insertion_point: Option<StyleSheetInDocument>, style_shared_lock: &StyleSharedRwLock, )
Add a stylesheet owned by owner
to the list of document sheets, in the
correct tree position.
sourcepub fn unregister_named_element(
&self,
id_map: &DomRefCell<HashMapTracedValues<Atom, Vec<Dom<Element>>>>,
to_unregister: &Element,
id: &Atom,
)
pub fn unregister_named_element( &self, id_map: &DomRefCell<HashMapTracedValues<Atom, Vec<Dom<Element>>>>, to_unregister: &Element, id: &Atom, )
Remove any existing association between the provided id/name and any elements in this document.
sourcepub fn register_named_element(
&self,
id_map: &DomRefCell<HashMapTracedValues<Atom, Vec<Dom<Element>>>>,
element: &Element,
id: &Atom,
root: Root<Dom<Node>>,
)
pub fn register_named_element( &self, id_map: &DomRefCell<HashMapTracedValues<Atom, Vec<Dom<Element>>>>, element: &Element, id: &Atom, root: Root<Dom<Node>>, )
Associate an element present in this document with the provided id/name.
Trait Implementations§
source§impl MallocSizeOf for DocumentOrShadowRoot
impl MallocSizeOf for DocumentOrShadowRoot
source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Auto Trait Implementations§
impl Freeze for DocumentOrShadowRoot
impl !RefUnwindSafe for DocumentOrShadowRoot
impl !Send for DocumentOrShadowRoot
impl !Sync for DocumentOrShadowRoot
impl Unpin for DocumentOrShadowRoot
impl !UnwindSafe for DocumentOrShadowRoot
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
Mutably borrows from an owned value. Read more
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>
Creates a filterable data provider with the given name for debugging. Read more
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>
Converts
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>
Converts
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 moresource§impl<T> MaybeBoxed<Box<T>> for T
impl<T> MaybeBoxed<Box<T>> for T
source§fn maybe_boxed(self) -> Box<T>
fn maybe_boxed(self) -> Box<T>
Convert
source§impl<T> MaybeBoxed<T> for T
impl<T> MaybeBoxed<T> for T
source§fn maybe_boxed(self) -> T
fn maybe_boxed(self) -> T
Convert