Reputation: 729
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?
Upvotes: 0
Views: 266
Reputation: 1545
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.
Upvotes: 1