Trait style::dom::NodeInfo

source ·
pub trait NodeInfo {
    // Required methods
    fn is_element(&self) -> bool;
    fn is_text_node(&self) -> bool;
}
Expand description

Simple trait to provide basic information about the type of an element.

We avoid exposing the full type id, since computing it in the general case would be difficult for Gecko nodes.

Required Methods§

source

fn is_element(&self) -> bool

Whether this node is an element.

source

fn is_text_node(&self) -> bool

Whether this node is a text node.

Implementors§