mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
Catch console log messages from SafeWebView
This simplifies debugging of the content loaded by Etcher, including analysis of loaded analytics libraries. Changelog-entry: Catch console log messages from SafeWebView Change-type: patch Signed-off-by: Roman Mazur <roman@balena.io>
This commit is contained in:
parent
bde9a97b17
commit
5151d751a3
@ -107,9 +107,14 @@ class SafeWebview extends react.PureComponent {
|
||||
this.didFailLoad = _.bind(this.didFailLoad, this)
|
||||
this.didGetResponseDetails = _.bind(this.didGetResponseDetails, this)
|
||||
|
||||
const logWebViewMessage = (event) => {
|
||||
console.log('Message from SafeWebview:', event.message);
|
||||
};
|
||||
|
||||
this.eventTuples = [
|
||||
[ 'did-fail-load', this.didFailLoad ],
|
||||
[ 'new-window', this.constructor.newWindow ]
|
||||
[ 'new-window', this.constructor.newWindow ],
|
||||
[ 'console-message', logWebViewMessage ]
|
||||
]
|
||||
|
||||
// Make a persistent electron session for the webview
|
||||
|
Loading…
x
Reference in New Issue
Block a user