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

Does not work in Electron #76

Open
BigPhilCombo opened this issue Nov 1, 2017 · 5 comments
Open

Does not work in Electron #76

BigPhilCombo opened this issue Nov 1, 2017 · 5 comments
Assignees
Milestone

Comments

@BigPhilCombo
Copy link

When running in electron using the BrowserWindow.addDevToolsExtension() method - the extensions will generate the following error

Uncaught ReferenceError: browser is not defined at chrome-extension://spector-js/contentScript.js:10:9 at chrome-extension://spector-js/contentScript.js:11:3 at runContentScript (D:\Projects\gsi_xtream\node_modules\electron\dist\resources\electron.asar\renderer\content-scripts-injector.js:23:26) at Object.onceWrapper (events.js:314:30) at emitNone (events.js:105:13) at process.emit (events.js:207:7)

@sebavan
Copy link
Member

sebavan commented Nov 1, 2017

Hi,

I have never tried installing the extension on from Electron. Could you rely on the npm package embedded in your page as a workaround ?

@BigPhilCombo
Copy link
Author

That works thanks. I do think you should still try to enable the extension for Electron use but this will do for this project. Thanks again.

@sebavan
Copy link
Member

sebavan commented Nov 1, 2017

No problem, I ll keep it as an enhancement for 2.0

@sebavan sebavan self-assigned this Nov 1, 2017
@sebavan sebavan added this to the Version 2.0 milestone Nov 1, 2017
@mmakrzem
Copy link

How do I activate and record using Spector.js inside an Electron application? In chrome, there is a toolbar button that you need to press to get the record button, but there is no button that appears in Electron by default.

@sebavan
Copy link
Member

sebavan commented Jan 11, 2018

You need currently to rely on the embedded tools either through the module as the support for Electron has not been developped: https://github.com/BabylonJS/Spector.js#webpack-sample
or through the script directly: https://github.com/BabylonJS/Spector.js#use-as-a-script-reference by installing the npm package.

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

No branches or pull requests

3 participants