wip: book documentation

This commit is contained in:
Jonathan Kelley committed 2021-10-16 17:04:28 -04:00
1 parent 7dedad4c26
commit 16dbf4a6f8
87 files changed
+997 -319

No files matched your search

+3 -1
View File
@@ -49,7 +49,9 @@ fn make_synthetic_event(name: &str, val: serde_json::Value) -> Box<dyn Any + Sen
Box::new(serde_json::from_value::<CompositionEvent>(val).unwrap())
}
"keydown" | "keypress" | "keyup" => {
Box::new(serde_json::from_value::<KeyboardEvent>(val).unwrap())
dbg!(&val);
let evt = serde_json::from_value::<KeyboardEvent>(val).unwrap();
Box::new(evt)
}
"focus" | "blur" => {
//
+5 -1
View File
@@ -1,10 +1,14 @@
<!DOCTYPE html>
<html>
<head>
<html>
<head>
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0 maximum-scale=1.0 user-scalable=no"
charset="utf-8" /> -->
</head>
<body>
<div id="_dioxusroot">
</div>
+8 -6
View File
@@ -244,7 +244,8 @@ const SerializeMap = {
"focus": serialize_focus,
"blur": serialize_focus,
"change": serialize_change,
"change": serialize_form,
// "change": serialize_change,
"input": serialize_form,
"invalid": serialize_form,
@@ -335,16 +336,17 @@ function serialize_composition(event) {
}
function serialize_keyboard(event) {
return {
alt_key: event.altKey,
char_code: event.charCode,
key: event.key,
key_code: event.keyCode,
alt_key: event.altKey,
ctrl_key: event.ctrlKey,
locale: event.locale,
location: event.location,
meta_key: event.metaKey,
repeat: event.repeat,
key_code: event.keyCode,
shift_key: event.shiftKey,
locale: "locale",
// locale: event.locale,
location: event.location,
repeat: event.repeat,
which: event.which,
}
}