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 in the module where I'm checking, but I can find no way to examine the functions in the other. Is there some way to do this?
Each module has its own top-level scope . In other words, top-level variables and functions from a module are not seen in other scripts.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.