Handle {} elements in elements._js_cb_single
When using document.getElementById like in find_id, we can get {} instead of null/None back when nothing was found.
This commit is contained in:
parent
d9d14d4a4c
commit
f98820971d
@ -339,7 +339,7 @@ class WebEngineElements(browsertab.AbstractElements):
|
|||||||
js_elem: The element serialized from javascript.
|
js_elem: The element serialized from javascript.
|
||||||
"""
|
"""
|
||||||
log.webview.debug("Got element from JS: {!r}".format(js_elem))
|
log.webview.debug("Got element from JS: {!r}".format(js_elem))
|
||||||
if js_elem is None:
|
if not js_elem:
|
||||||
callback(None)
|
callback(None)
|
||||||
else:
|
else:
|
||||||
elem = webengineelem.WebEngineElement(js_elem, tab=self)
|
elem = webengineelem.WebEngineElement(js_elem, tab=self)
|
||||||
|
Loading…
Reference in New Issue
Block a user