You can pass a callback function from Javascript to Python, when you do that, what you get in Python is a JavascriptCallback
object that you can use to call javascript function back.
If you call the javascript callback and it fails, instead of js exception what you get is a python exception that exits the application by default (see sys.excepthook in examples).
See also JavascriptBindings.
See also Issue #11 (Throw JS / Python exceptions according to execution context).
Table of contents:
Parameter | Type |
---|---|
[params..] (optional) | mixed |
Return | void |
Call the javascript callback function. Pass arguments optionally.
For a list of allowed types for mixed
see JavascriptBindings.IsValueAllowed().
Return | Frame |
Get Frame object associated with this callback. If Browser was destroyed then Frame may be None.
Return | int |
Get this callback's identifier.
Return | string |
Get the javascript function's name. If that is an anonymous function you will get some random name like "É☺«".
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。