Closed pankajitengg closed 1 year ago
Can someone please guide me , how can I achieve this .
I'm sorry, we don't offer support about Electron here. You should probably check the Electron community instead: https://www.electronjs.org/community
Tabs are basically a wrapper around Electron webviews, so I advise you to refer to the related documentation (especially the part about the reload method).
The menu question is related to the communication between processes, so it is definitely out of the scope of our project.
You could easily add a button trigger like Ctrl
+ R
that reloads the active WebView.
A script to reload the active webview would look like this as an example:
document.querySelector("body > tab-group").shadowRoot.querySelector("div > div > webview.visible").reload()
https://sudovanilla.com/code/Korbs/Penpot-Desktop/src/branch/main/src/process/extra/Menu.js#L77-L81
I am new to Electron JS. I just created an application which use 2 tab in window and both of the tabs open a url (google.com and amazon.in). In Menu I have a Home Button. On click of home, I need to reload the home url of that active tab.
index.html
index.js