Replace jQuery in webview.py
This commit is contained in:
parent
3e1b42bb62
commit
280f78535b
@ -599,7 +599,7 @@ body {{ zoom: {zoom}; background: {background}; direction: {lang_dir}; {font} }}
|
|||||||
self._bridge_context = None
|
self._bridge_context = None
|
||||||
|
|
||||||
def adjustHeightToFit(self) -> None:
|
def adjustHeightToFit(self) -> None:
|
||||||
self.evalWithCallback("$(document.body).height()", self._onHeight)
|
self.evalWithCallback("document.documentElement.offsetHeight", self._onHeight)
|
||||||
|
|
||||||
def _onHeight(self, qvar: Optional[int]) -> None:
|
def _onHeight(self, qvar: Optional[int]) -> None:
|
||||||
from aqt import mw
|
from aqt import mw
|
||||||
|
Loading…
Reference in New Issue
Block a user