Including HTML5-only jQuery script in IE7 gives "'undefined' is null or not an object" #157

Open
orls opened this Issue Feb 6, 2012 · 2 comments

Comments

Projects
None yet
3 participants

orls commented Feb 6, 2012

I'm using the HTML5-only version of History.js, as hash-fallbacks aren't appropriate for our site architecture at the moment but we require normalization of behaviour in modern browsers. I haven't wrapped the script in conditional comments, so older browsers are still loading and parsing the scripts. I appreciate this is less than ideal but that's a separate issue with it's own reasons.

Currently in IE7 the HTML5-only jQuery version is throwing "'Undefined' is null or not an object" -- I'm using the compressed bungled version but it looks like line 30 of Core, i.e. JSON object isn't defined.

Does this count as a bug, or are conditional-comments the expected usage for older browsers?

It seems that the bundled js file misses the json2.js file. As a workaround you could add json2.js, history.js and an adaptor manually, that seems to work.

I included the json2.js before the bundled HTML5-only jQuery on IE7 (using conditional comments) and it started to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment