feat: get web working properly
This commit is contained in:
1 parent
3c19def550
commit
18d6b1ad6f
26 files changed
+674
-1422
No files matched your search
+87
-87
@@ -60,90 +60,90 @@ pub use touch::*;
|
||||
pub use transition::*;
|
||||
pub use wheel::*;
|
||||
|
||||
// pub fn event_bubbles(evt: &str) -> bool {
|
||||
// match evt {
|
||||
// "copy" => true,
|
||||
// "cut" => true,
|
||||
// "paste" => true,
|
||||
// "compositionend" => true,
|
||||
// "compositionstart" => true,
|
||||
// "compositionupdate" => true,
|
||||
// "keydown" => true,
|
||||
// "keypress" => true,
|
||||
// "keyup" => true,
|
||||
// "focus" => false,
|
||||
// "focusout" => true,
|
||||
// "focusin" => true,
|
||||
// "blur" => false,
|
||||
// "change" => true,
|
||||
// "input" => true,
|
||||
// "invalid" => true,
|
||||
// "reset" => true,
|
||||
// "submit" => true,
|
||||
// "click" => true,
|
||||
// "contextmenu" => true,
|
||||
// "doubleclick" => true,
|
||||
// "dblclick" => true,
|
||||
// "drag" => true,
|
||||
// "dragend" => true,
|
||||
// "dragenter" => false,
|
||||
// "dragexit" => false,
|
||||
// "dragleave" => true,
|
||||
// "dragover" => true,
|
||||
// "dragstart" => true,
|
||||
// "drop" => true,
|
||||
// "mousedown" => true,
|
||||
// "mouseenter" => false,
|
||||
// "mouseleave" => false,
|
||||
// "mousemove" => true,
|
||||
// "mouseout" => true,
|
||||
// "scroll" => false,
|
||||
// "mouseover" => true,
|
||||
// "mouseup" => true,
|
||||
// "pointerdown" => true,
|
||||
// "pointermove" => true,
|
||||
// "pointerup" => true,
|
||||
// "pointercancel" => true,
|
||||
// "gotpointercapture" => true,
|
||||
// "lostpointercapture" => true,
|
||||
// "pointerenter" => false,
|
||||
// "pointerleave" => false,
|
||||
// "pointerover" => true,
|
||||
// "pointerout" => true,
|
||||
// "select" => true,
|
||||
// "touchcancel" => true,
|
||||
// "touchend" => true,
|
||||
// "touchmove" => true,
|
||||
// "touchstart" => true,
|
||||
// "wheel" => true,
|
||||
// "abort" => false,
|
||||
// "canplay" => false,
|
||||
// "canplaythrough" => false,
|
||||
// "durationchange" => false,
|
||||
// "emptied" => false,
|
||||
// "encrypted" => true,
|
||||
// "ended" => false,
|
||||
// "error" => false,
|
||||
// "loadeddata" => false,
|
||||
// "loadedmetadata" => false,
|
||||
// "loadstart" => false,
|
||||
// "pause" => false,
|
||||
// "play" => false,
|
||||
// "playing" => false,
|
||||
// "progress" => false,
|
||||
// "ratechange" => false,
|
||||
// "seeked" => false,
|
||||
// "seeking" => false,
|
||||
// "stalled" => false,
|
||||
// "suspend" => false,
|
||||
// "timeupdate" => false,
|
||||
// "volumechange" => false,
|
||||
// "waiting" => false,
|
||||
// "animationstart" => true,
|
||||
// "animationend" => true,
|
||||
// "animationiteration" => true,
|
||||
// "transitionend" => true,
|
||||
// "toggle" => true,
|
||||
// _ => panic!("unsupported event type {:?}", evt),
|
||||
// }
|
||||
// }
|
||||
pub fn event_bubbles(evt: &str) -> bool {
|
||||
match evt {
|
||||
"copy" => true,
|
||||
"cut" => true,
|
||||
"paste" => true,
|
||||
"compositionend" => true,
|
||||
"compositionstart" => true,
|
||||
"compositionupdate" => true,
|
||||
"keydown" => true,
|
||||
"keypress" => true,
|
||||
"keyup" => true,
|
||||
"focus" => false,
|
||||
"focusout" => true,
|
||||
"focusin" => true,
|
||||
"blur" => false,
|
||||
"change" => true,
|
||||
"input" => true,
|
||||
"invalid" => true,
|
||||
"reset" => true,
|
||||
"submit" => true,
|
||||
"click" => true,
|
||||
"contextmenu" => true,
|
||||
"doubleclick" => true,
|
||||
"dblclick" => true,
|
||||
"drag" => true,
|
||||
"dragend" => true,
|
||||
"dragenter" => false,
|
||||
"dragexit" => false,
|
||||
"dragleave" => true,
|
||||
"dragover" => true,
|
||||
"dragstart" => true,
|
||||
"drop" => true,
|
||||
"mousedown" => true,
|
||||
"mouseenter" => false,
|
||||
"mouseleave" => false,
|
||||
"mousemove" => true,
|
||||
"mouseout" => true,
|
||||
"scroll" => false,
|
||||
"mouseover" => true,
|
||||
"mouseup" => true,
|
||||
"pointerdown" => true,
|
||||
"pointermove" => true,
|
||||
"pointerup" => true,
|
||||
"pointercancel" => true,
|
||||
"gotpointercapture" => true,
|
||||
"lostpointercapture" => true,
|
||||
"pointerenter" => false,
|
||||
"pointerleave" => false,
|
||||
"pointerover" => true,
|
||||
"pointerout" => true,
|
||||
"select" => true,
|
||||
"touchcancel" => true,
|
||||
"touchend" => true,
|
||||
"touchmove" => true,
|
||||
"touchstart" => true,
|
||||
"wheel" => true,
|
||||
"abort" => false,
|
||||
"canplay" => false,
|
||||
"canplaythrough" => false,
|
||||
"durationchange" => false,
|
||||
"emptied" => false,
|
||||
"encrypted" => true,
|
||||
"ended" => false,
|
||||
"error" => false,
|
||||
"loadeddata" => false,
|
||||
"loadedmetadata" => false,
|
||||
"loadstart" => false,
|
||||
"pause" => false,
|
||||
"play" => false,
|
||||
"playing" => false,
|
||||
"progress" => false,
|
||||
"ratechange" => false,
|
||||
"seeked" => false,
|
||||
"seeking" => false,
|
||||
"stalled" => false,
|
||||
"suspend" => false,
|
||||
"timeupdate" => false,
|
||||
"volumechange" => false,
|
||||
"waiting" => false,
|
||||
"animationstart" => true,
|
||||
"animationend" => true,
|
||||
"animationiteration" => true,
|
||||
"transitionend" => true,
|
||||
"toggle" => true,
|
||||
_ => true,
|
||||
}
|
||||
}
|
||||
@@ -18,8 +18,8 @@ pub mod events;
|
||||
pub mod geometry;
|
||||
mod global_attributes;
|
||||
pub mod input_data;
|
||||
// #[cfg(feature = "wasm-bind")]
|
||||
// mod web_sys_bind;
|
||||
#[cfg(feature = "wasm-bind")]
|
||||
mod web_sys_bind;
|
||||
|
||||
pub use elements::*;
|
||||
pub use events::*;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
use crate::geometry::{ClientPoint, Coordinates, ElementPoint, PagePoint, ScreenPoint};
|
||||
use crate::input_data::{decode_key_location, decode_mouse_button_set, MouseButton};
|
||||
use crate::on::{
|
||||
use crate::events::{
|
||||
AnimationData, CompositionData, KeyboardData, MouseData, PointerData, TouchData,
|
||||
TransitionData, WheelData,
|
||||
};
|
||||
use crate::geometry::{ClientPoint, Coordinates, ElementPoint, PagePoint, ScreenPoint};
|
||||
use crate::input_data::{decode_key_location, decode_mouse_button_set, MouseButton};
|
||||
use keyboard_types::{Code, Key, Modifiers};
|
||||
use std::convert::TryInto;
|
||||
use std::str::FromStr;
|
||||
|
||||
Reference in new issue
Block a user