diff options
author | Lars-Dominik Braun <lars@6xq.net> | 2018-11-06 16:53:16 +0100 |
---|---|---|
committer | Lars-Dominik Braun <lars@6xq.net> | 2018-11-06 16:54:58 +0100 |
commit | aeab124ac9f1e3e88f6a8ae246c90b8094e94223 (patch) | |
tree | 4b6394fcaca6b045a98f43736a6dac66a3144a7c /crocoite/util.py | |
parent | 60fe79f2d898757f4f20aa89015e86cd63ef7871 (diff) | |
download | crocoite-aeab124ac9f1e3e88f6a8ae246c90b8094e94223.tar.gz crocoite-aeab124ac9f1e3e88f6a8ae246c90b8094e94223.tar.bz2 crocoite-aeab124ac9f1e3e88f6a8ae246c90b8094e94223.zip |
Switch single mode to asyncio
This is a direct port to asyncio without any design changes. These need
to happen in further refinements.
Fixes issue #1.
Diffstat (limited to 'crocoite/util.py')
-rw-r--r-- | crocoite/util.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crocoite/util.py b/crocoite/util.py index 3a62533..daa60db 100644 --- a/crocoite/util.py +++ b/crocoite/util.py @@ -37,8 +37,8 @@ def packageUrl (path): """ return 'urn:' + __package__ + ':' + path -def getFormattedViewportMetrics (tab): - layoutMetrics = tab.Page.getLayoutMetrics () +async def getFormattedViewportMetrics (tab): + layoutMetrics = await tab.Page.getLayoutMetrics () # XXX: I’m not entirely sure which one we should use here return '{}x{}'.format (layoutMetrics['layoutViewport']['clientWidth'], layoutMetrics['layoutViewport']['clientHeight']) |