I have two js files. I use namespaces in my js files. Here's what the first JS files look like:
(function(common, undefined) {
"use strict";
common.FunctionOne = function(){
};
}(window.common = window.common || {}));
The second js file is as follows:
(function(processing, undefined) {
"use strict";
processing.FunctionTwo = function(){
common.FunctionOne()
};
}(window.processing = window.processing || {}));
On my HTML page, I included the first js first and second later (via tags). I get the error "Unable to get property" FunctionOne "from undefined or null reference" only in IE8. It works great for other browsers.
I'm not sure, but this seems like a namespace problem. It seems that IE8 does not recognize the function defined in the first js file.
Any thoughts?
Thank.
source
share