Code Library

Namespaces in JavaScript libraries (incomplete)

One of the biggest challenges when working with JavaScript is the concept of “Global Namespace Pollution“. If two or more functions have the same name:

Because JavaScript does not have a function overloading mechanism, Function B will override Function A, assuming that the library containing Function B was loaded last.

Microsofts advice to anyone writing JavaScript is to use Namespaces or a unique prefix/postfix.

Unique Function Prefix

Namespaced library names


No additional information.

JavaScript Libraries for Microsoft Dynamics CRM((