【发布时间】:2020-09-04 06:49:32
【问题描述】:
我正在尝试从 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)
}
)
我在这里缺少什么?
【问题讨论】:
标签: javascript python promise brython