pub fn on_toggle<CB, MSG>(cb: CB) -> Attribute<MSG>where CB: FnMut(bool) -> MSG + 'static, MSG: 'static,
attach an on_toggle event to the html element