Add Missing Fields From Scroll Event (#4022)
* Add onscroll field data * Add bun 1.2.10 generated file changes * Improve error messaging when bun is not installed
This commit is contained in:
1 parent
d00636ca31
commit
c9ca9f32ad
14 files changed
+281
-37
No files matched your search
@@ -5,9 +5,9 @@ use dioxus_html::{
|
||||
InteractionElementOffset, InteractionLocation, Modifiers, ModifiersInteraction,
|
||||
PointerInteraction,
|
||||
},
|
||||
HasMouseData, HasScrollData, HasWheelData,
|
||||
HasMouseData, HasWheelData,
|
||||
};
|
||||
use web_sys::{Event, WheelEvent};
|
||||
use web_sys::WheelEvent;
|
||||
|
||||
use super::{Synthetic, WebEventExt};
|
||||
|
||||
@@ -83,21 +83,6 @@ impl PointerInteraction for Synthetic<WheelEvent> {
|
||||
}
|
||||
}
|
||||
|
||||
impl HasScrollData for Synthetic<Event> {
|
||||
fn as_any(&self) -> &dyn std::any::Any {
|
||||
&self.event
|
||||
}
|
||||
}
|
||||
|
||||
impl WebEventExt for dioxus_html::ScrollData {
|
||||
type WebEvent = web_sys::Event;
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
|
||||
self.downcast::<web_sys::Event>().cloned()
|
||||
}
|
||||
}
|
||||
|
||||
impl WebEventExt for dioxus_html::WheelData {
|
||||
type WebEvent = web_sys::WheelEvent;
|
||||
|
||||
|
||||
Reference in new issue
Block a user