We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d335837 commit 3f765a6Copy full SHA for 3f765a6
examples/snippets/javascript_bindings.py
@@ -41,7 +41,7 @@ def main():
41
cef.Initialize()
42
browser = cef.CreateBrowserSync(url=cef.GetDataUrl(g_htmlcode),
43
window_title="Javascript Bindings")
44
- browser.SetClientHandler(LifespanHandler())
+ browser.SetClientHandler(LoadHandler())
45
bindings = cef.JavascriptBindings()
46
bindings.SetFunction("py_function", py_function)
47
bindings.SetFunction("py_callback", py_callback)
@@ -60,7 +60,7 @@ def py_callback(value):
60
print("Value sent from Javascript: "+value)
61
62
63
-class LifespanHandler(object):
+class LoadHandler(object):
64
def OnLoadEnd(self, browser, **_):
65
browser.ExecuteFunction("js_function", "I am a Python string #1")
66
0 commit comments