1 decade ago by oravecz
I ran into a conflict recently between another library which caused some behanior that was a bit hard to track down. This plugin declared a top level namespace of 'wm'.
ImpactJS uses a global variable located at wm.ig.global.wm to indicate whether a class is loaded using Weltmeister or not. For some reason, the plugins wm variable was stepping on Impact's ig.global.wm variable which made no sense.
Until I looked at the code in ImpactJS.
Is this necessary? Cannot Weltmeister just access ig.global.wm directly without resorting to this approach?
window.wm = { ... }
ImpactJS uses a global variable located at wm.ig.global.wm to indicate whether a class is loaded using Weltmeister or not. For some reason, the plugins wm variable was stepping on Impact's ig.global.wm variable which made no sense.
Until I looked at the code in ImpactJS.
window.ig = { global: window, ... }
Is this necessary? Cannot Weltmeister just access ig.global.wm directly without resorting to this approach?