mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 23:00:04 -04:00
eframe web: access app from WebHandle (#1886)
Co-authored-by: Stanislav <enomado@users.noreply.github.com> Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
This commit is contained in:
@@ -32,7 +32,6 @@ pub struct WebHandle {
|
||||
#[wasm_bindgen]
|
||||
impl WebHandle {
|
||||
#[wasm_bindgen]
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub fn stop_web(&self) -> Result<(), wasm_bindgen::JsValue> {
|
||||
let mut app = self.handle.lock();
|
||||
let res = app.destroy();
|
||||
@@ -43,6 +42,12 @@ impl WebHandle {
|
||||
|
||||
res
|
||||
}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub fn set_some_content_from_javasript(&mut self, _some_data: &str) {
|
||||
let _app = self.handle.lock().app_mut::<WrapApp>();
|
||||
// _app.data = some_data;
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
|
||||
Reference in New Issue
Block a user