QtWebEngine: Fix tab passed to WebEngineElement

This commit is contained in:
Florian Bruhin 2016-08-18 16:16:56 +02:00
parent a06dcc7f0b
commit 73210fb87c

View File

@ -326,7 +326,7 @@ class WebEngineElements(browsertab.AbstractElements):
""" """
elems = [] elems = []
for js_elem in js_elems: for js_elem in js_elems:
elem = webengineelem.WebEngineElement(js_elem, tab=self) elem = webengineelem.WebEngineElement(js_elem, tab=self._tab)
elems.append(elem) elems.append(elem)
callback(elems) callback(elems)
@ -342,7 +342,7 @@ class WebEngineElements(browsertab.AbstractElements):
if js_elem is None: if js_elem is None:
callback(None) callback(None)
else: else:
elem = webengineelem.WebEngineElement(js_elem, tab=self) elem = webengineelem.WebEngineElement(js_elem, tab=self._tab)
callback(elem) callback(elem)
def find_css(self, selector, callback, *, only_visible=False): def find_css(self, selector, callback, *, only_visible=False):