I've three html files a.html,b.html & c.html
All of them call index.js.
Inside index.js, I'm importing a variable from a.js,b.js & c.js. Based on which html file called index.js , I want to use the variable from the corresponding js file inside index.js.
It's not possible for me to remove index.js as it contains logic, which is needed for some other tasks.
Some more clarification:
index.js
if calling_html == a.html:
   import {variable} from a.js
else if calling_html == b.html:
   import {variable} from b.js
else 
   import {variable} from c.js
How to find calling_html?

 
     
    