@@ -43,9 +43,9 @@ pub type ListenerCallback<'a> =
43/// An event listener.
43/// An event listener.
44pub struct Listener<'a> {
44pub struct Listener<'a> {
45 /// The type of event to listen for.
45 /// The type of event to listen for.
46− pub event: &'a str,
46+ pub(crate) event: &'a str,
47 /// The callback to invoke when the event happens.
47 /// The callback to invoke when the event happens.
48− pub callback: ListenerCallback<'a>,
48+ pub(crate) callback: ListenerCallback<'a>,
51/// An attribute on a DOM node, such as `id="my-thing"` or
51/// An attribute on a DOM node, such as `id="my-thing"` or
@@ -196,19 +196,3 @@ impl Listener<'_> {
200−/// Utility function for creating event listeners and downcasting the component
201−/// to its `RootRender` concrete type.
202−pub fn on<'a, F>(bump: &'a Bump, event: &'a str, callback: F) -> Listener<'a>
204− F: Fn(&mut dyn RootRender, VdomWeak, web_sys::Event) + 'static,
208− callback: bump.alloc(
209− move |component: &mut dyn RootRender, vdom: VdomWeak, event: web_sys::Event| {
210− callback(component, vdom, event);