mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-06-19 20:34:09 -04:00
"wasThrown" is necessarily always included in the result message from chrome for Runtime.evaluate
This commit is contained in:
parent
93b16f28b9
commit
05e673917d
1 changed files with 2 additions and 1 deletions
|
@ -83,9 +83,10 @@ class Behavior:
|
||||||
|
|
||||||
def notify_of_result(self, chrome_message):
|
def notify_of_result(self, chrome_message):
|
||||||
# {'id': 59, 'result': {'result': {'type': 'boolean', 'value': True}, 'wasThrown': False}}
|
# {'id': 59, 'result': {'result': {'type': 'boolean', 'value': True}, 'wasThrown': False}}
|
||||||
|
# {'id': 59, 'result': {'result': {'type': 'boolean', 'value': False}}
|
||||||
self.waiting_result_msg_ids.remove(chrome_message['id'])
|
self.waiting_result_msg_ids.remove(chrome_message['id'])
|
||||||
if ('result' in chrome_message
|
if ('result' in chrome_message
|
||||||
and not chrome_message['result']['wasThrown']
|
and not ('wasThrown' in chrome_message['result'] and chrome_message['result']['wasThrown'])
|
||||||
and 'result' in chrome_message['result']
|
and 'result' in chrome_message['result']
|
||||||
and type(chrome_message['result']['result']['value']) == bool):
|
and type(chrome_message['result']['result']['value']) == bool):
|
||||||
self.script_finished = chrome_message['result']['result']['value']
|
self.script_finished = chrome_message['result']['result']['value']
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue