Execute in the current tab, and not the first one
This commit is contained in:
parent
94178c558a
commit
b0880df695
@ -1519,10 +1519,8 @@ class CommandDispatcher:
|
|||||||
Args:
|
Args:
|
||||||
js_code: The string to evaluate.
|
js_code: The string to evaluate.
|
||||||
"""
|
"""
|
||||||
tabbed_browser = objreg.get('tabbed-browser', scope='window',
|
out = self._current_widget().page().mainFrame().evaluateJavaScript(
|
||||||
window='last-focused')
|
js_code)
|
||||||
frame = tabbed_browser.widget(0).page().mainFrame()
|
|
||||||
out = frame.evaluateJavaScript(js_code)
|
|
||||||
|
|
||||||
if out is None:
|
if out is None:
|
||||||
# Getting the actual error (if any) seems to be difficult. The
|
# Getting the actual error (if any) seems to be difficult. The
|
||||||
|
Loading…
Reference in New Issue
Block a user