-
-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Implement Callback Functions for JavaScript Evaluation Result #474
Comments
I think this one is just because of history reason. When webview repo provide the API, it just want one that can run js script. |
I hacked together something which "works on my machine" (meaning Windows): I'm open for feedback, but I also understand if you say that now is not the right time to implement this feature. |
Hello,
|
Problem
I use Tauri to open windows of external sites as well as the "main" application window of local HTML/JS/CSS. I still want to interact with the DOM of those external sites and know the result of that interaction. This doesn't have to be done via JavaScript.
Solution
All three webview APIs on the main operating systems support some kind of callback when executing JavaScript. For each os I added a link to the documentation and the place in the code where that callback possibility is just ignored.
Is there a (security) reason this functionality is not provided?
Linux
Windows
Apple
Alternatives
An alternative I considered was to build a JavaScript wrapper which sends the result of the evaluated JavaScript over RPC. But this would be a security problem because now external sites have access to RPC.
Would you assign yourself to implement this feature?
I'm only just starting with Rust and would assign myself to do a proof of concept for WebView2 under Windows. I currently don't have the capability to develop under Linux and never will have the capability to develop under Apple.
The text was updated successfully, but these errors were encountered: