diff options
Diffstat (limited to 'core/core.js')
-rw-r--r-- | core/core.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/core.js b/core/core.js index fead23907..f44bf253e 100644 --- a/core/core.js +++ b/core/core.js @@ -155,6 +155,10 @@ SharedQueue Binary Layout asyncHandlers[opId] = cb; } + function setAsyncHandlerByName(opName, cb) { + setAsyncHandler(opsCache[opName], cb); + } + function handleAsyncMsgFromRust() { while (true) { const opIdBuf = shift(); @@ -256,6 +260,7 @@ SharedQueue Binary Layout jsonOpAsync, jsonOpSync, setAsyncHandler, + setAsyncHandlerByName, dispatch: send, dispatchByName: dispatch, ops, |