Skip to content

Manipulating the content of iframe, is it possible? #11059

Answered by FabianLars
erayerdin asked this question in Q&A
Discussion options

You must be logged in to vote

It's technically possible to inject js into newly created iframes but that's currently disabled (to fix a security issue) but will be re-enabled as a config at some point (see todos here https://github.com/tauri-apps/wry/pull/1251/files) -> This is tauri's initialization_script config. Depending on idk CSP and stuff the loaded website has set this may not help much if you also need some form communication channel.

For windows at least there should be native-ish apis though, i think this is a good entry point https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/frames?tabs=dotnetcsharp - generally the windows webview is the "nicest" one in this regard so on macos/linux you ma…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@erayerdin
Comment options

@FabianHummel
Comment options

Answer selected by erayerdin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants