• I just got struck by an ugly implementation in the WordPress.com Stats plugin that deliberately adds functions to the global namespace polluting it and clashing against mootools, thus breaking the library at least under IE, Safari and Opera (Gecko-based browsers seem to give preference to the mootools implementation of addEvent).

    For sanity and future proofness, I would suggest you to encapsulate your functions in a private namespace, as you are not only colliding with mootools, but also any other library out there implementing an addEvent function in the global namespace (DOM Assistant comes to mind right now, there may be more)

    If you need help on the javascript end just go to that ugly contact form in my blog and I will gladly contribute with a fix.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WordPress.com Stats pollute the js namespace’ is closed to new replies.