Open Gozala opened 9 years ago
Basically the way I propose model web view is like an iframe with nested content iframe with in it. So scripts could run in the outer iframe and messages could be exchanged with it like with regular iframes now. Outer iframe also should be able to interact with (content) sub iframe as more privileged iframes can with less privileged iframes if they're with in the same process.
servo/servo#7083
For example atom-shell webview exposes API similar to frame scripts, that lets you interact with a DOM loaded in the web view and communicate with a web view embedder via message passing. For we already have a use case where we would like to grab twitter cards from the loaded page and only way for this would be to change an API to add more metadata. But this won't scale there always may be a new thing that embedder may need to do with in the web view. I think web view should be a able to contain a script element that would be evaled in the shell of the web view. I imagine something along these lines: