[][src]Trait simplecss::Element

pub trait Element: Sized {
    fn parent_element(&self) -> Option<Self>;
fn prev_sibling_element(&self) -> Option<Self>;
fn has_local_name(&self, name: &str) -> bool;
fn attribute_matches(
        &self,
        local_name: &str,
        operator: AttributeOperator
    ) -> bool;
fn pseudo_class_matches(&self, class: PseudoClass) -> bool; }

A trait to query an element node metadata.

Required methods

fn parent_element(&self) -> Option<Self>

Returns a parent element.

fn prev_sibling_element(&self) -> Option<Self>

Returns a previous sibling element.

fn has_local_name(&self, name: &str) -> bool

Checks that the element has a specified local name.

fn attribute_matches(
    &self,
    local_name: &str,
    operator: AttributeOperator
) -> bool

Checks that the element has a specified attribute.

fn pseudo_class_matches(&self, class: PseudoClass) -> bool

Checks that the element matches a specified pseudo-class.

Loading content...

Implementors

Loading content...