mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
jsbrowser: Add API for common browser actions
This commit is contained in:
parent
26a113a77c
commit
645ff7aaaa
@ -442,6 +442,18 @@ class Browser(QObject, FormsMixin):
|
||||
if wait_for_load:
|
||||
return self._wait_for_load(timeout)
|
||||
|
||||
def stop(self):
|
||||
'Stop loading of current page'
|
||||
self.page.triggerAction(self.page.Stop)
|
||||
|
||||
def stop_scheduled_refresh(self):
|
||||
'Stop any scheduled page refresh/reloads'
|
||||
self.page.triggerAction(self.page.StopScheduledPageRefresh)
|
||||
|
||||
def reload(self, bypass_cache=False):
|
||||
action = self.page.ReloadAndBypassCache if bypass_cache else self.page.Reload
|
||||
self.page.triggerAction(action)
|
||||
|
||||
@property
|
||||
def dom_ready(self):
|
||||
return self.page.dom_loaded
|
||||
|
Loading…
x
Reference in New Issue
Block a user