[][src]Function sauron::html::on

pub fn on<C, ATT, EVENT, MSG>(name: ATT, c: C) -> Attribute<ATT, EVENT, MSG> where
    ATT: Clone,
    C: Into<Callback<EVENT, MSG>>, 

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.