Trait html5ever_ext::QualNameExt
[−]
[src]
pub trait QualNameExt { fn is_unprefixed_and_unnamespaced(&self) -> bool; fn is_only_local(&self, local_name: &LocalName) -> bool; fn is_only_local_of(&self, local_names: &[LocalName]) -> bool; fn can_have_children(&self) -> bool; fn text_content_should_be_escaped(&self) -> bool; }
Additional methods to work with QualName
Required Methods
fn is_unprefixed_and_unnamespaced(&self) -> bool
Is this name effectively local?
fn is_only_local(&self, local_name: &LocalName) -> bool
Is this qualified name this local-only name (no prefix, no namespace)
fn is_only_local_of(&self, local_names: &[LocalName]) -> bool
Is this qualified name on these local-only names (no prefix, no namespace)
fn can_have_children(&self) -> bool
Can this element have children?
fn text_content_should_be_escaped(&self) -> bool
Should an immediate child text node have <
, >
and &
characters escaped?
In modern HTML 5, the only common nodes which don't need this are <script>
and <style>
.
In this case, the immediate child text node's content should not contain, say, </script>
as this will cause a parse error.
Implementations on Foreign Types
impl QualNameExt for Rc<Node>
[src]
fn is_unprefixed_and_unnamespaced(&self) -> bool
[src]
fn is_only_local(&self, local_name: &LocalName) -> bool
[src]
fn is_only_local_of(&self, local_names: &[LocalName]) -> bool
[src]
fn can_have_children(&self) -> bool
[src]
fn text_content_should_be_escaped(&self) -> bool
[src]
Implementors
impl QualNameExt for QualName