Feat: update solved problems with context API

This commit is contained in:
Jonathan Kelley committed 2021-02-10 12:48:02 -05:00
1 parent 24e8bcb028
commit c97a9647e3
7 files changed
+209 -9

No files matched your search

+3 -2
View File
@@ -1068,9 +1068,10 @@ pub fn attr<'a>(name: &'a str, value: &'a str) -> Attribute<'a> {
/// // do something when a click happens...
/// });
/// ```
pub fn on<'a, F>(bump: &'a Bump, event: &'a str, callback: F) -> Listener<'a>
pub fn on<'a, 'b, F: 'b>(bump: &'a Bump, event: &'a str, callback: F) -> Listener<'a>
where
F: Fn(()) + 'a,
'b: 'a + 'static,
F: Fn(()) + 'b,
{
Listener {
event,