Revert "Insert qutebrowser scripts on DocumentCreation and DocumentReady"
This reverts commit fac0f66e52
.
This commit is contained in:
parent
84bae210ab
commit
5c73910a33
@ -640,21 +640,17 @@ class WebEngineTab(browsertab.AbstractTab):
|
||||
utils.read_file('javascript/webelem.js'),
|
||||
utils.read_file('javascript/caret.js'),
|
||||
])
|
||||
scripts = self._widget.page().scripts()
|
||||
|
||||
script = QWebEngineScript()
|
||||
script.setInjectionPoint(QWebEngineScript.DocumentCreation)
|
||||
# We can't use DocumentCreation here as WORKAROUND for
|
||||
# https://bugreports.qt.io/browse/QTBUG-66011
|
||||
script.setInjectionPoint(QWebEngineScript.DocumentReady)
|
||||
script.setSourceCode(js_code)
|
||||
script.setWorldId(QWebEngineScript.ApplicationWorld)
|
||||
# FIXME:qtwebengine what about runsOnSubFrames?
|
||||
scripts.insert(script)
|
||||
|
||||
# WORKAROUND for https://bugreports.qt.io/browse/QTBUG-66011
|
||||
script2 = QWebEngineScript()
|
||||
script2.setInjectionPoint(QWebEngineScript.DocumentReady)
|
||||
script2.setSourceCode(js_code)
|
||||
script2.setWorldId(QWebEngineScript.ApplicationWorld)
|
||||
scripts.insert(script2)
|
||||
page = self._widget.page()
|
||||
script.setWorldId(QWebEngineScript.ApplicationWorld)
|
||||
|
||||
# FIXME:qtwebengine what about runsOnSubFrames?
|
||||
page.scripts().insert(script)
|
||||
|
||||
def _install_event_filter(self):
|
||||
self._widget.focusProxy().installEventFilter(self._mouse_event_filter)
|
||||
|
Loading…
Reference in New Issue
Block a user