electron-tabs | Tab component for Electron | Mobile Application library
kandi X-RAY | electron-tabs Summary
kandi X-RAY | electron-tabs Summary
Simple tabs for Electron applications
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of electron-tabs
electron-tabs Key Features
electron-tabs Examples and Code Snippets
Community Discussions
Trending Discussions on electron-tabs
QUESTION
I am trying to have my communicate between different rendering processes in electron. Rather than have multiple windows I am using electron-tabs which can be found here. To start I simply want my main window to be able to send a message using ipcRenderer to each tab. With multiple windows, you could store each window in a global variable like this stack overflow question and then use the web-contents to send a message.
UPDATE: In the electron-tabs documentation, it suggests you can use the tabs webview the same as you would a windows web-contents (see here). Unfortunately, either I am missing something or it is a little more complicated.
For the code: I have a main window mainWindow.html
...ANSWER
Answered 2021-Jan-14 at 16:23I figured it out. You can get the webcontentsID from the tab and use ipcRenderer.sendTo function.
For the code: I have a main window mainWindow.html
QUESTION
When working with Electron and VSCode, I've had a few syntax problems in code but no errors/warnings showed up in either VSCode's debug console or the Electron Chromium consoles.
With the Electron Chromium console, I have made sure that I enabled all levels, and Preserve log
.
The problems that gave NO console clues include
- With certain page script, Not
main.js
orrederer.js
, I didn't enablenodeIntegration
, so no NodeJS modules worked - Forgetting to add
let
/var
when defining variables, coming from other scripting worlds. - Forgetting to add
new
when creating objects. - An ES6 class constructor signature changed, e.g., more input args introduced, but the object creation code didn't change accordingly.
- Hitting an undefined object.
- When dealing with HTML strings with JS, there are errors in the HTML strings.
I feel a dire need to figure out a full list of "silent" problems that won't ever have any IDE/interpreter feedback during dev in the JS/NodeJS/Electron land. Otherwise, I would lose too much time on stupid errors.
Or am I missing anything obvious? Tool configuration, or simply misunderstanding of the problems?
UpdatesI've discovered that main.js
or renderer.js
works with the debugger, but since I'm using a thirdparty lib electron-tabs
, not additional code linked to my electron-tab
's tab pages is supported by the debuggers. The above examples apply to those tab JS code. I don't know why yet, but at least this is a crucial detail.
Next, I'd love to know if adding more pages will make a difference.
...ANSWER
Answered 2020-Feb-24 at 04:10I've finally found my problem after a lot of digging.
To my understanding, with Electron, we need to include ALL scripts into the relevant processes, e.g., main or renderer, to be able to use the debug consoles. Otherwise, no feedback will be available except for the basic linter that VSCode comes with.
After adding the offending scripts to my main HTML, so that it looks like:
QUESTION
I have installed electron-modules package for implementing tabs in electron as shown below
package.json
...ANSWER
Answered 2018-Sep-16 at 02:47In the documentation for electron-tabs
, it mentions to call it from the renderer process, yet you're doing it in the main process. The main process is where you control the electron apis from, e.g. opening windows like you are in main.js
. Each browser window creates a new renderer process, which can communicate with the main process or manage its own document and Web APIS.
The error you're getting there, document is not defined
, is because the main process does not have access to the DOM because you can open multiple browsers from the same main process; it wouldn't know which to use. So what you need to do is put a script in the renderer process. Create a renderer.js
, and put the electron-tabs
code (const TabGroup = require("electron-tabs");
) there. Then, in your index.html
, put , and it should work.
QUESTION
I have a project that's using webpack and electron. I updated my app to use the latest version of electron as it was using electron-prebuilt. Since updating to the latest version I am now unable to compile my app due to this error. I've tried some suggestions from other SO posts which suggest editing webpack.config and added
...ANSWER
Answered 2017-Apr-11 at 12:40Set target: 'electron-main'
in your Webpack configuration.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install electron-tabs
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page