Remove has_js
This commit is contained in:
parent
5982787651
commit
0caee94994
@ -761,10 +761,6 @@ class AbstractTab(QWidget):
|
|||||||
"""
|
"""
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
def has_js(self):
|
|
||||||
"""Check if qutebrowser can run javascript in this tab."""
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
|
|
||||||
|
@ -528,10 +528,6 @@ class WebEngineTab(browsertab.AbstractTab):
|
|||||||
else:
|
else:
|
||||||
self._widget.page().runJavaScript(code, callback)
|
self._widget.page().runJavaScript(code, callback)
|
||||||
|
|
||||||
def has_js(self):
|
|
||||||
# QtWebEngine can run JS even if the page can't
|
|
||||||
return True
|
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
log.stub()
|
log.stub()
|
||||||
|
|
||||||
|
@ -628,10 +628,6 @@ class WebKitTab(browsertab.AbstractTab):
|
|||||||
if callback is not None:
|
if callback is not None:
|
||||||
callback(result)
|
callback(result)
|
||||||
|
|
||||||
def has_js(self):
|
|
||||||
settings = QWebSettings.globalSettings()
|
|
||||||
return settings.testAttribute(QWebSettings.JavascriptEnabled)
|
|
||||||
|
|
||||||
def icon(self):
|
def icon(self):
|
||||||
return self._widget.icon()
|
return self._widget.icon()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user