DangerousStyleElement

Trait DangerousStyleElement 

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

    // Required method
    fn layout_element(&self) -> Self::ConcreteLayoutElement;
}
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 ConcreteLayoutElement: LayoutElement<'dom>

The concrete implementation of LayoutElement implemented in script.

Required Methods§

Source

fn layout_element(&self) -> Self::ConcreteLayoutElement

The concrete implementation of LayoutNode implemented in script. 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§