Skip to content
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

Disable javascript in webview #986

Closed
ademcaglin opened this issue Jul 15, 2023 · 1 comment · May be fixed by #1496
Closed

Disable javascript in webview #986

ademcaglin opened this issue Jul 15, 2023 · 1 comment · May be fixed by #1496

Comments

@ademcaglin
Copy link

I am exploring the use of Tauri for my desktop application, and I have a specific requirement to disable JavaScript within the webview. However, I couldn't find any built-in option or documentation related to this feature.

Does anyone have experience with disabling JavaScript in the Tauri webview or know of any potential solutions?

@FabianLars
Copy link
Member

Wry does not have a built-in api for that yet but you can use the webview bindings to do it yourself. For example on Windows there's https://docs.rs/webview2-com/latest/webview2_com/Microsoft/Web/WebView2/Win32/struct.ICoreWebView2Settings.html#method.SetIsScriptEnabled

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants