fix: collectFormValues should be retrieveFormValues, export WeakDioxusChannel (#3993)

* fix: collectFormValues should be retrieveFormValues

* fix: export weakDioxusChannel
This commit is contained in:
Jonathan Kelley authored and GitHub committed 2025-04-15 23:03:56 -07:00
1 parent 68188f1d7b
commit 1001d78c7f
5 files changed
+16 -11

No files matched your search

+12 -8
View File
@@ -32,6 +32,17 @@ impl JSOwner {
}
}
#[wasm_bindgen::prelude::wasm_bindgen(module = "/src/js/eval.js")]
extern "C" {
pub type WeakDioxusChannel;
#[wasm_bindgen(method, js_name = "rustSend")]
pub fn rust_send(this: &WeakDioxusChannel, value: wasm_bindgen::JsValue);
#[wasm_bindgen(method, js_name = "rustRecv")]
pub async fn rust_recv(this: &WeakDioxusChannel) -> wasm_bindgen::JsValue;
}
#[wasm_bindgen::prelude::wasm_bindgen(module = "/src/js/eval.js")]
extern "C" {
pub type WebDioxusChannel;
@@ -54,13 +65,6 @@ extern "C" {
#[wasm_bindgen(method)]
pub fn weak(this: &WebDioxusChannel) -> WeakDioxusChannel;
pub type WeakDioxusChannel;
#[wasm_bindgen(method, js_name = "rustSend")]
pub fn rust_send(this: &WeakDioxusChannel, value: wasm_bindgen::JsValue);
#[wasm_bindgen(method, js_name = "rustRecv")]
pub async fn rust_recv(this: &WeakDioxusChannel) -> wasm_bindgen::JsValue;
}
/// Provides the Document through [`ScopeId::provide_context`].
@@ -136,7 +140,7 @@ impl Document for WebDocument {
const PROMISE_WRAPPER: &str = r#"
return (async function(){
{JS_CODE}
dioxus.close();
})();
"#;