Feat: event loop

This commit is contained in:
Jonathan Kelley committed 2021-02-12 16:11:33 -05:00
1 parent 8295ac4b3d
commit ea2aa4b0c9
39 files changed
+495 -287

No files matched your search

+3 -5
View File
@@ -1071,11 +1071,9 @@ pub fn attr<'a>(name: &'a str, value: &'a str) -> Attribute<'a> {
/// ```
pub fn on<'a, 'b, F: 'static>(
bump: &'a Bump,
event: &'a str,
callback: impl Fn(()) + 'static,
) -> Listener<'a>
// F: Fn(()) + 'b,
{
event: &'static str,
callback: impl Fn(()) + 'a,
) -> Listener<'a> {
Listener {
event,
callback: bump.alloc(callback),