Use statusbar to ask if long-running script should be interrupted.
This commit is contained in:
parent
67f64b5e6a
commit
7315712359
@ -184,3 +184,11 @@ class BrowserPage(QWebPage):
|
||||
"""
|
||||
filename, _ = QFileDialog.getOpenFileName(None, None, suggested_file)
|
||||
return filename
|
||||
|
||||
def shouldInterruptJavaScript(self):
|
||||
"""Override shouldInterruptJavaScript to use the statusbar."""
|
||||
answer = message.modular_question("Interrupt long-running javascript?",
|
||||
PromptMode.yesno)
|
||||
if answer is None:
|
||||
answer == True
|
||||
return answer
|
||||
|
Loading…
Reference in New Issue
Block a user