Add some logging for javascript messages.
This commit is contained in:
parent
5043f58f3c
commit
ec487dd6b1
@ -480,6 +480,7 @@ class BrowserPage(QWebPage):
|
|||||||
|
|
||||||
def javaScriptAlert(self, _frame, msg):
|
def javaScriptAlert(self, _frame, msg):
|
||||||
"""Override javaScriptAlert to use the statusbar."""
|
"""Override javaScriptAlert to use the statusbar."""
|
||||||
|
log.js.debug("alert: {}".format(msg))
|
||||||
if (self._is_shutting_down or
|
if (self._is_shutting_down or
|
||||||
config.get('content', 'ignore-javascript-alert')):
|
config.get('content', 'ignore-javascript-alert')):
|
||||||
return
|
return
|
||||||
@ -487,6 +488,7 @@ class BrowserPage(QWebPage):
|
|||||||
|
|
||||||
def javaScriptConfirm(self, _frame, msg):
|
def javaScriptConfirm(self, _frame, msg):
|
||||||
"""Override javaScriptConfirm to use the statusbar."""
|
"""Override javaScriptConfirm to use the statusbar."""
|
||||||
|
log.js.debug("confirm: {}".format(msg))
|
||||||
if self._is_shutting_down:
|
if self._is_shutting_down:
|
||||||
return False
|
return False
|
||||||
ans = self._ask("[js confirm] {}".format(msg),
|
ans = self._ask("[js confirm] {}".format(msg),
|
||||||
|
Loading…
Reference in New Issue
Block a user