Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use remote BrowserWindow #11

Closed
flaushi opened this issue Feb 14, 2019 · 2 comments
Closed

How to use remote BrowserWindow #11

flaushi opened this issue Feb 14, 2019 · 2 comments

Comments

@flaushi
Copy link

flaushi commented Feb 14, 2019

Hey,
I want to create a progress bar from a script that is loaded inside my html. So, I think I have to use the electron.remote.BrowserWindow.
In the source,

const BrowserWindow = require('electron').BrowserWindow;

however, the electron.BrowserWindow is imported.

@stefanDeveloper
Copy link
Contributor

stefanDeveloper commented Apr 28, 2019

Got stuck on the same problem...

Currently I'm trying to use the electron-progressbar in my ipcRenderer function.
For some reason I cannot set my my remote.BrowserWindow as the BrowserWindow of my ProgressBar

ipcRenderer.on('test', (event) => {
  let win = remote.getCurrentWindow();
  const progressbar = new ProgressBar({
    indeterminate: false,
    text: 'Preparing data...',
    detail: 'Wait',
    browserWindow: {
        parent: remote.BrowserWindow
    }
  });

});

I receive Uncaught TypeError: BrowserWindow is not a constructor

@AndersonMamede
Copy link
Owner

Closing this as PR #12 was merged.

Thank you all for the contribution!

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

No branches or pull requests

3 participants