How would I place an electron
BrowserView
or BrowserWindow
inside Atom
like in this package?
There are many examples online for BrowserView
and BrowserWindow
, but every single one opens a new window (not inside Atom
).
Most frequently used example:
import { remote } from 'electron';const opts = { width: 800, height: 600 };const win = new remote.BrowserWindow(opts);
After some research I learnt:
- That instances of
BrowserWindow
can be placed within one another. - There is a
parent
option (to be used inopts
in the code above). - There is a
setBrowserView
function.
But I need the correct compatible Atom
object to do any of the above, if one exists (Atom's window
object doesn't work, its very different to a BrowserView
).
More info:Most of the packages that achieve this use WebView, which the latest electron
doesn't support. Even the docs recommend using a BrowserWindow
(or iFrame).
This may be impossible, but if anyone has any suggestions or solutions, they will be much appreciated.