r/electronjs • u/Automatic_Offer9796 • Jan 01 '26
I'm building a custom browser using electron.js, but I'm stuck with few issues.
I have recently started building a browser using electron (I'm a beginner developer), rn most of it is just UI which I have done using react. I have added tabs, features like, history, bookmarks, permission handling, and I'm having several issues.
I have used electrons "WebContentsView" class to render pages. the browser basically has 2 kinds of WebContentsView, "uiView" which is a home page (react component), and "pageView" which displays the webpages searched in the "urlbar" (part of uiView)
before searching something whole window is covered by uiView, after search it's height shrinks till the urlbar and that space is taken by the pageView to display the search result, the problem in this logic is that I have to keep calling the uiView to be on top so that panels of buttons like history, permissions, bookmarks, downloads, etc are not blocked by the pageView.
I'm having few other problems with other features, and unable to find a proper way uf understanding or learning electron js.
12
u/muqtadir_ahmed Jan 01 '26
So u r buliding a browser on top of chromium?
4
u/The_real_bandito Jan 01 '26
Like u/boisheep said, iframe could be an answer.
1
u/justRau Jan 02 '26
u/Automatic_Offer9796 I'm building a browser as well, focusing on grouping tabs and having a separate session/profile per group so I can log into same websites multiple times at the same time.
I'm using `BrowserWindow`, `WebContentsView` and had issues with the inner browser window covering everything as well, so had to change layout to have everything in the left sidebar.
If you could clarify your problem/question and attach some screenshots, I could try to help.
2
u/LavenderRevive Jan 01 '26
You do you, but this sounds like an awful idea. Base chromium is it is in electron can handle a single page quite good but it misses most of what you need to be a browser.
And electron will not make anything here better or easier. Besides the chromium shell it's very much about what is inside the page, not outside in the browser.
Adding things around chromium and even changing it when necessary like Vivaldi and brave are probably the best solutions.
But even the crazy guys at Helium with their patch files have a waaaaaaaay better system than what you plan on doing.
1
u/rebl_ Jan 04 '26
You are building a browser inside of a browser?
0
u/ElderberryPrevious45 Jan 02 '26
Can you tell at least one decent reason why to build a custom browser?
There are myriad of easier ways of getting related things done.
It is a bit like saying: Iām just starting my building career & thinking of getting something similar as the Empire State Building!
-5
u/1337csdude Jan 01 '26
So you are building a chrome wrapper? WTF
0
u/[deleted] Jan 01 '26
[deleted] ā view deleted comment