diff --git a/src/ffi/js/buffer.rs b/src/ffi/js/buffer.rs
index cdf3b0c..5f1b140 100644
--- a/src/ffi/js/buffer.rs
+++ b/src/ffi/js/buffer.rs
@@ -37,7 +37,7 @@ impl CodempBufferController {
}
#[napi(js_name = "send")]
- pub fn js_send(&self, op: TextChange) -> napi::Result<()> {
- Ok(self.send(op)?)
+ pub async fn js_send(&self, op: TextChange) -> napi::Result<()> {
+ Ok(self.send(op).await?)
}
}
\ No newline at end of file
diff --git a/src/ffi/js/cursor.rs b/src/ffi/js/cursor.rs
index 3a83daf..11a524d 100644
--- a/src/ffi/js/cursor.rs
+++ b/src/ffi/js/cursor.rs
@@ -66,13 +66,14 @@ impl CodempCursorController {
}
#[napi(js_name = "send")]
- pub fn js_send(&self, pos: JsCursor) -> napi::Result<()> {
- Ok(self.send(crate::api::Cursor::from(pos))?)
+ pub async fn js_send(&self, pos: JsCursor) -> napi::Result<()> {
+ Ok(self.send(crate::api::Cursor::from(pos)).await?)
}
#[napi(js_name= "try_recv")]
- pub fn js_try_recv(&self) -> napi::Result