Make QtWebEngine inspector work with JS disabled
This commit is contained in:
parent
f1789effdc
commit
12a405965a
@ -55,6 +55,8 @@ Fixed
|
|||||||
loaded correctly in some situations.
|
loaded correctly in some situations.
|
||||||
- The statusbar now more closely reflects the caret mode state.
|
- The statusbar now more closely reflects the caret mode state.
|
||||||
- The icon on Windows should now be displayed in a higher resolution.
|
- The icon on Windows should now be displayed in a higher resolution.
|
||||||
|
- The QtWebEngine development tools (inspector) now also work when JavaScript is
|
||||||
|
disabled globally.
|
||||||
|
|
||||||
v1.2.1
|
v1.2.1
|
||||||
------
|
------
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from PyQt5.QtCore import QUrl
|
from PyQt5.QtCore import QUrl
|
||||||
from PyQt5.QtWebEngineWidgets import QWebEngineView
|
from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEngineSettings
|
||||||
|
|
||||||
from qutebrowser.browser import inspector
|
from qutebrowser.browser import inspector
|
||||||
|
|
||||||
@ -35,6 +35,8 @@ class WebEngineInspector(inspector.AbstractWebInspector):
|
|||||||
super().__init__(parent)
|
super().__init__(parent)
|
||||||
self.port = None
|
self.port = None
|
||||||
view = QWebEngineView()
|
view = QWebEngineView()
|
||||||
|
settings = view.settings()
|
||||||
|
settings.setAttribute(QWebEngineSettings.JavascriptEnabled, True)
|
||||||
self._set_widget(view)
|
self._set_widget(view)
|
||||||
|
|
||||||
def inspect(self, _page):
|
def inspect(self, _page):
|
||||||
|
Loading…
Reference in New Issue
Block a user