Execute in the current tab, and not the first one

This commit is contained in:
Martin Tournoij 2015-06-05 23:24:47 +02:00
parent 94178c558a
commit b0880df695

View File

@ -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