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

Function main

examples/snippets/javascript_bindings.py:40–51  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39
40def main():
41 cef.Initialize()
42 browser = cef.CreateBrowserSync(url=cef.GetDataUrl(g_htmlcode),
43 window_title="Javascript Bindings")
44 browser.SetClientHandler(LoadHandler())
45 bindings = cef.JavascriptBindings()
46 bindings.SetFunction("py_function", py_function)
47 bindings.SetFunction("py_callback", py_callback)
48 browser.SetJavascriptBindings(bindings)
49 cef.MessageLoop()
50 del browser
51 cef.Shutdown()
52
53
54def py_function(value, js_callback):

Callers 1

Calls 3

SetClientHandlerMethod · 0.80
SetJavascriptBindingsMethod · 0.80
LoadHandlerClass · 0.70

Tested by

no test coverage detected