()
| 38 | |
| 39 | |
| 40 | def 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 | |
| 54 | def py_function(value, js_callback): |
no test coverage detected