Fix as web event (#3178)
This commit is contained in:
1 parent
416811ba3a
commit
5186d8dded
15 files changed
+16
-32
No files matched your search
@@ -26,7 +26,6 @@ impl WebEventExt for dioxus_html::AnimationData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<web_sys::AnimationEvent> {
|
||||
self.downcast::<Synthetic<web_sys::AnimationEvent>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::AnimationEvent>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,6 @@ impl WebEventExt for dioxus_html::ClipboardData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
|
||||
self.downcast::<Synthetic<web_sys::Event>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::Event>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,6 @@ impl WebEventExt for dioxus_html::CompositionData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
|
||||
self.downcast::<Synthetic<web_sys::CompositionEvent>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::CompositionEvent>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,6 @@ impl WebEventExt for dioxus_html::DragData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<web_sys::DragEvent> {
|
||||
self.downcast::<Synthetic<DragEvent>>()
|
||||
.map(|data| data.event.clone())
|
||||
self.downcast::<DragEvent>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,6 @@ impl WebEventExt for dioxus_html::FocusData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
|
||||
self.downcast::<Synthetic<web_sys::FocusEvent>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::FocusEvent>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,6 @@ impl WebEventExt for dioxus_html::KeyboardData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<web_sys::KeyboardEvent> {
|
||||
self.downcast::<Synthetic<web_sys::KeyboardEvent>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::KeyboardEvent>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@ impl WebEventExt for dioxus_html::MediaData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
|
||||
self.downcast::<Synthetic<web_sys::Event>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::Event>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -120,7 +120,6 @@ impl WebEventExt for MountedData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<web_sys::Element> {
|
||||
self.downcast::<Synthetic<web_sys::Element>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::Element>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -73,7 +73,6 @@ impl WebEventExt for dioxus_html::MouseData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<web_sys::MouseEvent> {
|
||||
self.downcast::<Synthetic<web_sys::MouseEvent>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::MouseEvent>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -113,7 +113,6 @@ impl WebEventExt for dioxus_html::PointerData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<web_sys::PointerEvent> {
|
||||
self.downcast::<Synthetic<web_sys::PointerEvent>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::PointerEvent>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -39,8 +39,7 @@ impl WebEventExt for dioxus_html::ResizeData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<web_sys::ResizeObserverEntry> {
|
||||
self.downcast::<Synthetic<web_sys::ResizeObserverEntry>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::ResizeObserverEntry>().cloned()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ impl WebEventExt for dioxus_html::SelectionData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
|
||||
self.downcast::<Synthetic<web_sys::Event>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::Event>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,6 @@ impl WebEventExt for dioxus_html::ToggleData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
|
||||
self.downcast::<Synthetic<web_sys::Event>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::Event>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -105,7 +105,6 @@ impl WebEventExt for dioxus_html::TouchData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<web_sys::TouchEvent> {
|
||||
self.downcast::<Synthetic<web_sys::TouchEvent>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::TouchEvent>().cloned()
|
||||
}
|
||||
}
|
||||
@@ -94,8 +94,7 @@ impl WebEventExt for dioxus_html::ScrollData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
|
||||
self.downcast::<Synthetic<web_sys::Event>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::Event>().cloned()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,7 +103,6 @@ impl WebEventExt for dioxus_html::WheelData {
|
||||
|
||||
#[inline(always)]
|
||||
fn try_as_web_event(&self) -> Option<Self::WebEvent> {
|
||||
self.downcast::<Synthetic<web_sys::WheelEvent>>()
|
||||
.map(|e| e.event.clone())
|
||||
self.downcast::<web_sys::WheelEvent>().cloned()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user