Function sauron_parse::parser::tag_namespace [−][src]
pub fn tag_namespace(tag: &str) -> Option<&'static str>
Expand description
Find the namespace of this tag if the arg tag is an SVG tag, return the svg namespace html tags don’t need to have namespace while svg does, otherwise it will not be properly mounted into the DOM
Examples
use sauron_core::prelude::*; use sauron_parse::tag_namespace; assert_eq!(None, tag_namespace("div")); assert_eq!(Some(SVG_NAMESPACE), tag_namespace("rect"));
Limitations: script
, style
,and a
used inside svg will return None
, as these are also valid html tags.