Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

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'.
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?

1 decade ago by dominic

ig.global is simply a reference to window. Nothing more, nothing less.

Impact uses the ig namespace and Weltmeister additionally uses the wm namespace.

Quote from oravecz
ImpactJS uses a global variable located at wm.ig.global.wm to indicate whether a class is loaded using Weltmeister or not.

Huh? wm.ig.global.wm is not defined. What do you mean with "loaded using Weltmeister"?
Page 1 of 1
« first « previous next › last »