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

Function main

examples/snippets/ondomready.py:9–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8
9def main():
10 cef.Initialize()
11 browser = cef.CreateBrowserSync(url="https://www.google.com/",
12 window_title="_OnDomReady event")
13 load_handler = LoadHandler(browser)
14 browser.SetClientHandler(load_handler)
15 bindings = cef.JavascriptBindings()
16 bindings.SetFunction("LoadHandler_OnDomReady",
17 load_handler["_OnDomReady"])
18 browser.SetJavascriptBindings(bindings)
19 cef.MessageLoop()
20 del load_handler
21 del browser
22 cef.Shutdown()
23
24
25class LoadHandler(object):

Callers 1

ondomready.pyFile · 0.70

Calls 3

SetClientHandlerMethod · 0.80
SetJavascriptBindingsMethod · 0.80
LoadHandlerClass · 0.70

Tested by

no test coverage detected