簡體   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