pub fn attr<N, Va>(&self, name: N, value: Va) -> &Self
    where
        N: AsRef<str>,
        Va: AsRef<str>,
    {
        self.element.set_attribute(name.as_ref(), value.as_ref());

        self
    }
/// Set an attribute on the node.
///
/// # Example
/// ```
/// # use sycamore::prelude::*;
/// # use sycamore::builder::html::*;
/// # fn _test<G: GenericNode>() -> View<G> {
/// button().attr("type", "submit").build()
/// # }
/// ```
Set an attribute on the node.
Set an attribute on the node .
pub fn attr<N, Va>(&self, name: N, value: Va) -> &Self
    where
        N: AsRef<str>,
        Va: AsRef<str>,
    {
        self.element.set_attribute(name.as_ref(), value.as_ref());
        self
    }
pub fn attr < N , Va > ( & self , name : N , value : Va ) -> & Self where N : AsRef < str > , Va : AsRef < str > , { self . element . set_attribute ( name . as_ref ( ) , value . as_ref ( ) ) ; self }
Set an attribute on the node.
Set an attribute on the node .
&self
name
N
value
Va
example
None
use sycamore::prelude::*;
None
use sycamore::builder::html::*;
None
fn _test<g: genericnode>() -> view<g> {
None
}
None