JavaScript:windows.external,具有针对chrome、firefox的自定义功能
我有一个JavaScript文件,它使用windows.external调用一些外部函数(不同文件中的函数)JavaScript:windows.external,具有针对chrome、firefox的自定义功能,javascript,angularjs,Javascript,Angularjs,我有一个JavaScript文件,它使用windows.external调用一些外部函数(不同文件中的函数) windows.external.setValue('Hi'); 但以上仅适用于IE。我希望Chrome和Firefox具有相同的功能。谷歌搜索后,我得出以下结论: 我们可以在父js或html文件中定义函数 按以下方式调用: Chrome/Firefox --> window.parent.customFunction() IE --> win
windows.external.setValue('Hi');
但以上仅适用于IE。我希望Chrome和Firefox具有相同的功能。谷歌搜索后,我得出以下结论: 我们可以在父js或html文件中定义函数 按以下方式调用:
Chrome/Firefox --> window.parent.customFunction()
IE --> window.external.customFunction()