()
| 111 | // If the editor cannot be borrowed then it has encountered a panic - we should just ignore new dispatches |
| 112 | }); |
| 113 | } |
| 114 | |
| 115 | /// Web wake callback: queues a microtask that dispatches [`FutureMessage::Wake`]. |
| 116 | #[cfg(all(not(feature = "native"), target_family = "wasm"))] |
| 117 | pub(crate) fn async_wake_callback() -> Wake { |
| 118 | use std::sync::Arc; |
| 119 | Arc::new(|| { |
| 120 | wasm_bindgen_futures::spawn_local(async { |
| 121 | wrapper(|wrapper| wrapper.dispatch(FutureMessage::Wake)); |
| 122 | }); |
| 123 | }) |