Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Not loading js file #191

Open
notallowedbro opened this issue Jul 24, 2023 · 3 comments
Open

Not loading js file #191

notallowedbro opened this issue Jul 24, 2023 · 3 comments

Comments

@notallowedbro
Copy link

Subject: Issue with JavaScript files not functioning correctly when creating new tabs using electron-tabs

Description:
I am facing a critical issue while utilizing the electron-tabs package to manage tabs within my Electron application. When programmatically creating a new tab, the associated JavaScript file fails to execute properly, causing unexpected behavior. The problem seems to lie in the interaction between the tab creation process and the loading/execution of the JavaScript file.

Steps to Reproduce:

Open the Electron application.
Navigate to the tab management section.
Programmatically create a new tab using the electron-tabs package.
Observe that the JavaScript functionalities related to the newly created tab are not working as intended.
Expected Behavior:
Upon creating a new tab, the JavaScript file associated with the respective HTML file should execute correctly, enabling the expected functionalities and behaviors within the tab.

Actual Behavior:
Upon creating a new tab, the JavaScript file does not seem to load or function correctly. Consequently, essential functionalities are missing or malfunctioning within the newly created tab.

Code Snippets:
The code responsible for creating the new tab and loading the associated JavaScript file is as follows:

// Code for creating a new tab
const tabs = require('electron-tabs');
const tabGroup = new tabs.TabGroup();

const newTab = tabGroup.addTab({
title: 'New Tab',
src: 'path/to/html/file.html',
});

// The JavaScript file associated with 'path/to/html/file.html' does not function as expected.

Possible Solution:
At this point, I'm unsure of the exact cause of the issue. However, it might be worth investigating the tab creation process within the electron-tabs package and how it interacts with the JavaScript file loading mechanism. It's possible that there might be a timing issue or an event not triggering as expected.

Please let me know if you require any further information or assistance in resolving this bug. Your prompt attention to this matter is greatly appreciated. Thank you!

@m1m6
Copy link

m1m6 commented Aug 26, 2023

Same issue here

@brrd
Copy link
Owner

brrd commented Sep 1, 2023

We can't help you unless you give some precise code sample where we can see the actual file tree, in a separate repo for example. I also need to know you OS and the electron version.

@xuakson
Copy link

xuakson commented Oct 13, 2023

me too , didnt work for me, using electron version v26.3.0,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants