Get proper settings object in WebEngineElement._click_js
This commit is contained in:
parent
a7413d7b4a
commit
f9b046d766
@ -199,7 +199,10 @@ class WebEngineElement(webelem.AbstractWebElement):
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user