Improve line breaking

This commit is contained in:
Florian Bruhin 2016-10-30 18:49:41 +01:00
parent 620b952bb2
commit f4022a86fd

View File

@ -624,8 +624,8 @@ class WebKitTab(browsertab.AbstractTab):
def run_js_async(self, code, callback=None, *, world=None):
if world is not None and world != usertypes.JsWorld.jseval:
log.webview.warning("Ignoring world ID {}".format(world))
result = self._widget.page().mainFrame().documentElement() \
.evaluateJavaScript(code)
document_element = self._widget.page().mainFrame().documentElement()
result = document_element.evaluateJavaScript(code)
if callback is not None:
callback(result)