fix desktop mounted event
This commit is contained in:
1 parent
007aacc247
commit
378cbfabd9
5 files changed
+17
-126
No files matched your search
@@ -30,7 +30,7 @@ impl RenderedElementBacking for DesktopElement {
|
||||
>,
|
||||
>,
|
||||
> {
|
||||
let script = format!("return window.interpreter.GetClientRect({});", self.id.0);
|
||||
let script = format!("return window.interpreter.getClientRect({});", self.id.0);
|
||||
|
||||
let fut = self
|
||||
.query
|
||||
@@ -54,7 +54,7 @@ impl RenderedElementBacking for DesktopElement {
|
||||
behavior: dioxus_html::ScrollBehavior,
|
||||
) -> std::pin::Pin<Box<dyn futures_util::Future<Output = dioxus_html::MountedResult<()>>>> {
|
||||
let script = format!(
|
||||
"return window.interpreter.ScrollTo({}, {});",
|
||||
"return window.interpreter.scrollTo({}, {});",
|
||||
self.id.0,
|
||||
serde_json::to_string(&behavior).expect("Failed to serialize ScrollBehavior")
|
||||
);
|
||||
@@ -81,7 +81,7 @@ impl RenderedElementBacking for DesktopElement {
|
||||
focus: bool,
|
||||
) -> std::pin::Pin<Box<dyn futures_util::Future<Output = dioxus_html::MountedResult<()>>>> {
|
||||
let script = format!(
|
||||
"return window.interpreter.SetFocus({}, {});",
|
||||
"return window.interpreter.setFocus({}, {});",
|
||||
self.id.0, focus
|
||||
);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ use desktop_context::{EventData, UserWindowEvent, WebviewQueue, WindowEventHandl
|
||||
use dioxus_core::*;
|
||||
use dioxus_html::{event_bubbles, MountedData};
|
||||
use dioxus_html::{native_bind::NativeFileEngine, FormData, HtmlEvent};
|
||||
use dioxus_interpreter_js::Channel;
|
||||
use dioxus_interpreter_js::binary_protocol::Channel;
|
||||
use element::DesktopElement;
|
||||
use eval::init_eval;
|
||||
use futures_util::{pin_mut, FutureExt};
|
||||
|
||||
Reference in new issue
Block a user