summaryrefslogtreecommitdiff
path: root/crocoite/behavior.py
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2018-11-25 09:42:13 +0100
committerLars-Dominik Braun <lars@6xq.net>2018-11-25 09:54:14 +0100
commit2be982d477c5ffdeafea95ba14569a05da59cb0d (patch)
treef4ce80c38d8515610e41e35246f5fdd7b995e74a /crocoite/behavior.py
parentb0a66f3502b7959aed19c25dad1f2deb86f7208d (diff)
downloadcrocoite-2be982d477c5ffdeafea95ba14569a05da59cb0d.tar.gz
crocoite-2be982d477c5ffdeafea95ba14569a05da59cb0d.tar.bz2
crocoite-2be982d477c5ffdeafea95ba14569a05da59cb0d.zip
behavior: Turn scroll JS code into class
Diffstat (limited to 'crocoite/behavior.py')
-rw-r--r--crocoite/behavior.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/crocoite/behavior.py b/crocoite/behavior.py
index d5c82a0..5f66538 100644
--- a/crocoite/behavior.py
+++ b/crocoite/behavior.py
@@ -120,9 +120,10 @@ class JsOnload (Behavior):
tab = self.loader.tab
yield self.script
result = await tab.Runtime.evaluate (expression=str (self.script))
+ exception = result.get ('exceptionDetails', None)
result = result['result']
assert result['type'] == 'object'
- assert result.get ('subtype') != 'error'
+ assert result.get ('subtype') != 'error', exception
self.context = result['objectId']
async def onstop (self):