yew_html_attributes/
lib.rs

1#![doc = include_str!("../readme.md")]
2use wasm_bindgen::prelude::Closure;
3use web_sys::Event;
4pub use yew_html_attributes_macro_derive::HasHtmlAttributes;
5pub use yew_html_attributes_macro_derive::has_html_attributes;
6pub use yew_html_attributes_macro_derive::use_attributes;
7
8/// The module that expopse everything you need to use the crate
9pub mod prelude {
10  pub use crate::has_html_attributes;
11  pub use crate::use_attributes;
12  pub use crate::HasHtmlAttributes;
13}
14
15/**
16 * This trait is used internaly by the use_attributes macro to set and unset the attributes on the html element. 
17 * 
18 * it has to be public but I would not recommend using this trait directly.
19*/
20pub trait HasHtmlAttributes {
21  fn set_attributes(&self, node: &web_sys::HtmlElement)-> Vec<Closure<dyn Fn(Event)>>;
22  fn unset_attributes(&self, node: &web_sys::HtmlElement);
23}