-
-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement draft RPC API. Remove old Callback mechanism. * Remove obsolete Callback API * Remove FuncCall and RPC * Update README * Rename set_rpc_handler() to set_handler() * Use shared rpc_proxy() function for platform consistency * Improve handling of promise cleanup * Update README with RPC API info. * Panic if webview handler is set after window creation. * Improve rpc_proxy() logic, try to ensure any corresponding promise is always removed. * Remove FuncCall wrapper. * Remove set_handler(). Use second argument to add_window_with_configs() to set an RpcHandler. * Fix windows type signature. * Tidy obsolete comments and code. * Remove promise fallback clean up code. So that rust rpc handlers can perform asynchronous tasks and defer promise evaluation until later. If an rpc handler returns None then the handler takes responsibility for ensuring the corresponding promise is resolved or rejected. If the request contains an `id` then the handler *must* ensure it evaluates either `RpcResponse::into_result_script()` or `RpcResponse::into_error_script()`. * Remove Sync bound from RpcHandler. Update multiwindow example so it is slightly more illustrative of a real-world use case. Now it launches a window when a button is clicked in the main webview. Multiple windows can be launched and the URL for the new window is passed from the Javascript code. * Remove urlencoding from examples.
- Loading branch information
Showing
13 changed files
with
257 additions
and
428 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.