Function mt_dom::attr_ns

source · []
pub fn attr_ns<NS, ATT, VAL>(
    namespace: Option<NS>,
    name: ATT,
    value: VAL
) -> Attribute<NS, ATT, VAL> where
    NS: PartialEq + Clone + Debug,
    ATT: PartialEq + Clone + Debug,
    VAL: PartialEq + Clone + Debug
Expand description

Create an attribute with namespace

Example

use mt_dom::{Attribute,attr_ns};

let href: Attribute<&'static str, &'static str, &'static str> =
    attr_ns(Some("http://www.w3.org/1999/xlink"), "href", "cool-script.js");