Merge branch 'master' into fix-onload-event

This commit is contained in:
ealmloff authored and GitHub committed 2023-06-19 08:16:40 -05:00
commit cf9ed74303
147 files changed
+8243 -635

No files matched your search

+5
View File
@@ -115,6 +115,9 @@ fn fun_name(
"load" | "error" => Image(de(data)?),
// Mounted
"mounted" => Mounted,
// OtherData => "abort" | "afterprint" | "beforeprint" | "beforeunload" | "hashchange" | "languagechange" | "message" | "offline" | "online" | "pagehide" | "pageshow" | "popstate" | "rejectionhandled" | "storage" | "unhandledrejection" | "unload" | "userproximity" | "vrdisplayactivate" | "vrdisplayblur" | "vrdisplayconnect" | "vrdisplaydeactivate" | "vrdisplaydisconnect" | "vrdisplayfocus" | "vrdisplaypointerrestricted" | "vrdisplaypointerunrestricted" | "vrdisplaypresentchange";
other => {
return Err(serde_value::DeserializerError::UnknownVariant(
@@ -154,6 +157,7 @@ pub enum EventData {
Transition(TransitionData),
Toggle(ToggleData),
Image(ImageData),
Mounted,
}
impl EventData {
@@ -176,6 +180,7 @@ impl EventData {
EventData::Transition(data) => Rc::new(data) as Rc<dyn Any>,
EventData::Toggle(data) => Rc::new(data) as Rc<dyn Any>,
EventData::Image(data) => Rc::new(data) as Rc<dyn Any>,
EventData::Mounted => Rc::new(MountedData::new(())) as Rc<dyn Any>,
}
}
}