mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-28 05:36:34 +00:00
Merge pull request #2931 from balena-io/roman/debugging
Catch console log messages from SafeWebView
This commit is contained in:
commit
506f9bf0e0
@ -107,9 +107,14 @@ class SafeWebview extends react.PureComponent {
|
|||||||
this.didFailLoad = _.bind(this.didFailLoad, this)
|
this.didFailLoad = _.bind(this.didFailLoad, this)
|
||||||
this.didGetResponseDetails = _.bind(this.didGetResponseDetails, this)
|
this.didGetResponseDetails = _.bind(this.didGetResponseDetails, this)
|
||||||
|
|
||||||
|
const logWebViewMessage = (event) => {
|
||||||
|
console.log('Message from SafeWebview:', event.message);
|
||||||
|
};
|
||||||
|
|
||||||
this.eventTuples = [
|
this.eventTuples = [
|
||||||
[ 'did-fail-load', this.didFailLoad ],
|
[ '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
|
// Make a persistent electron session for the webview
|
||||||
|
Loading…
x
Reference in New Issue
Block a user