Spector.js
Spector.js copied to clipboard
Does not work in Electron
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)
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 ?
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.
No problem, I ll keep it as an enhancement for 2.0
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.
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.