[−][src]Function sauron_vdom::builder::on
pub fn on<C, ATT, EVENT, MSG>(name: ATT, c: C) -> Attribute<ATT, EVENT, MSG> where
C: Into<Callback<EVENT, MSG>>,
ATT: Clone,
Creates a callback object from the function closure This will then be attached to the browser and emitted when that event is triggered.
FIXME: callbacks are recrated eveytime, therefore they are not equivalent when compared since function contents can not be compared. Only Rc's are compared.