Permalink
Browse files

Get proper settings object in WebEngineElement._click_js

  • Loading branch information...
The-Compiler committed Jun 6, 2017
1 parent a7413d7 commit f9b046d766eb6ecadd3787fbdad2f04d097fd1cc
Showing with 4 additions and 1 deletion.
  1. +4 −1 qutebrowser/browser/webengine/webengineelem.py
@@ -199,7 +199,10 @@ def _click_editable(self, click_target):
self._move_text_cursor()
def _click_js(self, _click_target):
settings = QWebEngineSettings.globalSettings()
# FIXME:qtwebengine Have a proper API for this
# pylint: disable=protected-access
settings = self._tab._widget.settings()
# pylint: enable=protected-access
attribute = QWebEngineSettings.JavascriptCanOpenWindows
could_open_windows = settings.testAttribute(attribute)
settings.setAttribute(attribute, True)

0 comments on commit f9b046d

Please sign in to comment.