Embed browser page & interact with it

I am working on a project that has the requirement of embedding a website as part of the application.
The project is cross-platform, so the method needs to work for Android, IOS and all PC platforms (Linux, Mac, Windows via Electron).

What I found so far is the InAppBrowser and the Capacitor Browser.

However, both just seem to open a popup window with the URL. It’s a bit of a disappointment that you can’t seem to “force” them to be opened in some component, for example.

What is actually needed is to embed the URL as if it was just another UI component (like a button or the webview on IOS) so that it can be placed pretty much anywhere within the normal application flow.

Additionally, interaction with the embedded website is needed. E.g. the possibility to react to events happening on the website with a push notification or a change to the rest of the app, or changing part of the HTML of the embedded website.

Currently, I am using react + capacitor, but if there is a solution that only works with Angular, that would be fine as well.

Use IFRAME or try to replace dom element with javascript?
And expect rejection when publishing to app and playstore

Why?
Doesn’t seem that unusual - I’ve seen a bunch of apps using parts of their own website as part of their application flow to re-use assets and logic.

well, depends on how much value add you bring in the app. So maybe just a word of caution for some, a plain rejection for others…