Skip to main content

DangerousStyleElement

Trait DangerousStyleElement 

Source
pub trait DangerousStyleElement<'dom>:
    TElement
    + Element<Impl = SelectorImpl>
    + Send
    + Sync {
    type ConcreteTypeBundle: LayoutDomTypeBundle<'dom>;

    // Required method
    fn layout_element(&self) -> LayoutElementOf<'dom, Self::ConcreteTypeBundle>;
}
Expand description

An element that can be passed to stylo and selectors that allows accessing the parent node. We consider this to be too dangerous for normal layout, so it is reserved only for using stylo and selectors.

If you are not interfacing with stylo and selectors you should not use this type, unless you know what you are doing.

Required Associated Types§

Source

type ConcreteTypeBundle: LayoutDomTypeBundle<'dom>

The concrete implementation of LayoutDomTypeBundle implemented in script.

Required Methods§

Source

fn layout_element(&self) -> LayoutElementOf<'dom, Self::ConcreteTypeBundle>

Get a handle to the original “safe” version of this element, a LayoutElement.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§