is there a WebView component for Compose for Web? ...
# compose-web
d
is there a WebView component for Compose for Web? with "WebView" I mean a sandboxed browser, similar to what is available on Android and iOS, where you can also intercept events such as the page finished loading
😅 3
c
You are in a browser 😅 just intercept the
window.navigator
events
d
With mobile webviews you can also run Javascript to click on buttons and elements. You cannot do that in an iframe, if the page domain is different. I wonder if Compose is planning to add such WebView sandboxed component.
c
I guess that would be highly inefficient to run a browser engine inside an browser. 🤔 supposedly that needs to be running as JavaScript or wasm
d
I don't think a browser engine would need to be shipped inside Compose. There might be a way to reuse the browser's engine.
c
Not really - compose is just an UI “framework”. In the end it just renders pixels on a canvas.
Or in the case of compose html interacts with the DOM tree
d
I guess it would be possible to embed a sandboxed browser instance inside the canvas? But I am not an expert in this domain. That's why I am asking.
c
a
i am not fully sure, but if I had a problem like yours, I'd try looking into Iframe, intercepting the navigator, or maybe using shadowRoot and web components to kind of scope/emulate your WebView
d
@andylamax let's say you want to programmatically click on a SEARCH button in a website which has a different domain. In a mobile WebView you can do that, but in an iFrame you can't.
a
Blocked by CORS??
d
Yeah
l
A browser extension might be the way to do it