I'm pulling my hair out over IE9/8; I'm trying to use mOxie, but it's showing up as undefined
, even though it's very clearly defined.
when, from another file, I log mOxie
to the console, it logs it perfectly fine in Chrome/IE10+, but firing the same script in IE9/8 logs undefined
.
However, in IE9/8, when I type 'mOxie' in the console directly, it correctly logs the object.
http://jsfiddle.net/vxyayxy8/ -- Run in IE10 mode, and you'll see that it loads an object. Run in IE9 mode, and you'll see that it logs undefined
Why is it that in IE9/8, when logging from a file (that's included after mOxie), it's undefined
, but is defined in IE9/8 when using the console directly?
Keep in mind that it's defined in Chrome and IE10+.
To test the theory of my answer below, in IE11, but in IE9 document mode, do console.log({})
-- I get undefined
, which fits the question and the answer. Can you reproduce this?