我正在尝试从 javascript 调用 brython 函数承诺它给出错误
ReferenceError: brythonListener is not defined
如何解决这个问题?
python/brython 代码
<script type="text/python">
def execute(*args):
print(str(args))
window.brythonListener=execute
</script>
javascript代码
function(data){
console.log(data) //till here code works
brythonListener(data)
}
)
我在这里想念什么?