MCPcopy Create free account
hub / github.com/cztomczak/cefpython / LoadHandler

Class LoadHandler

examples/qt.py:319–336  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317
318
319class LoadHandler(object):
320 def __init__(self, navigation_bar):
321 self.initial_app_loading = True
322 self.navigation_bar = navigation_bar
323
324 def OnLoadingStateChange(self, **_):
325 self.navigation_bar.updateState()
326
327 def OnLoadStart(self, browser, **_):
328 self.navigation_bar.url.setText(browser.GetUrl())
329 if self.initial_app_loading:
330 self.navigation_bar.cef_widget.setFocus()
331 # Temporary fix no. 2 for focus issue on Linux (Issue #284)
332 if LINUX:
333 print("[qt.py] LoadHandler.OnLoadStart:"
334 " keyboard focus fix no. 2 (Issue #284)")
335 browser.SetFocus(True)
336 self.initial_app_loading = False
337
338
339class FocusHandler(object):

Callers 1

embedBrowserMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected