• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

namespace of javascript function ?

 
Raj Ohadi
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my html page, when it calls a javascript function, I believe it looks through the imported javascript files one by one to find out the function name that matches to the one in the html. What if there are two identical function names defined in two different javascript that are both imported into this html ? Will the first found one be invoked or what ? Is there a way I can specify which javascript file I want the code to search for that function name ?

Thank you.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65123
91
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is invalid to have two names in the same global namespace that are the same. Don't do that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic