Electron Render Process Within Render Process iFrame


#1

Hi,

Could someone with a better understanding of the lower levels of electron explain to me why an iframed .html file embedded into an electron page doesn’t have access to any of the electron APIs, runtime? It’d be very useful for my work to be able to do this.

Thanks in advance!
Francois

ps. I’m seeing if I can do a work around by using two overlayed electron windows with one using the transparency feature. But that’s grosser.


#2

You might want to check out the webview tag. It sounds like it’s just what you’re looking for?


#3

Thanks! Will try it out


#4

@teleclimber After trying it out, my impression is it’s very flaky. The webview content doesn’t seem to scroll properly if it needs to to see all of it’s content. Also my use case was to CSS 3D transform the webview dom element to synchronize to some three.js content but it had odd artifacts like it seemed the webview’s content responded to changes in size with a noticeable lag and there were many rendering artifacts.

Thanks for pointing it out, have you seen any interesting projects or articles using it more richly?

Oh and the worst problem I was having was that I couldn’t debug code or inspect dom elements that were inside of the webview. This is a hard requirement for my approach. Oh well.


#5

If you run atom try the package web-browser. It seems smooth.

Yes you can. You have to make an api call to bring it up.