Ver Fonte

fix interpreter js

Evan Almloff há 1 ano atrás
pai
commit
8d38b6c11b
1 ficheiros alterados com 3 adições e 2 exclusões
  1. 3 2
      packages/interpreter/src/interpreter.js

+ 3 - 2
packages/interpreter/src/interpreter.js

@@ -380,7 +380,7 @@ class Interpreter {
 
 // this handler is only provided on the desktop and liveview implementations since this
 // method is not used by the web implementation
-function handler(event, name, bubbles, config) {
+async function handler(event, name, bubbles, config) {
   let target = event.target;
   if (target != null) {
     let preventDefaultRequests = target.getAttribute(`dioxus-prevent-default`);
@@ -431,7 +431,7 @@ function handler(event, name, bubbles, config) {
       event.preventDefault();
     }
 
-    let contents = serialize_event(event);
+    let contents = await serialize_event(event);
 
     /*POST_EVENT_SERIALIZATION*/
 
@@ -606,6 +606,7 @@ async function serialize_event(event) {
       if (event.dataTransfer && event.dataTransfer.files) {
         files = await serializeFileList(event.dataTransfer.files);
       }
+
       return { mouse: get_mouse_data(event), files };
     }
     case "click":