繁体   English   中英

检查 function 是否存在于其他 javascript 模块中

[英]Check if function exists in other javascript module

I have a web page that loads two javascript modules: <script type="module> . I want, in one module to check if a function exists in the other. I can see no way to do this. The firefox debugger identifies the functions在我正在检查的模块中,但我无法检查另一个模块中的功能。有没有办法做到这一点?

每个模块都有自己的顶级 scope 换句话说,模块中的顶级变量和函数在其他脚本中是看不到的。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM