I have an ASP.NET MVC 4.0 application that uses several calls several ajax requests. I have since updated several NuGet packages, of which jQuery was one and was updated to version 2.0.2.
Since updating, I have had issues with the following line in jquery-2.0.2.js
document.addEventListener( "DOMContentLoaded", completed, false );
throwing an
Unhandled Exception, Line 834
0x800a01b6 - Microsoft JScript runtime error: Object doesn't support this property or method
When the application is run in debug mode within VS2012. The problem only occurs in Internet Explorer 8. I've tested in verified that it's working in Opera, Opera Mobile Emulator, Chrome and Firefox.
I'm loading the CSS and script via the BundleConfig and that looks like this
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(
"~/Scripts/jquery-ui-{version}.js"));
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
"~/Scripts/jquery.unobtrusive*",
"~/Scripts/jquery.validate*"));
bundles.Add(new ScriptBundle("~/bundles/base").Include(
"~/Scripts/base.js"));
bundles.Add(new ScriptBundle("~/bundles/fingrr").Include(
"~/Scripts/fingrr.js"));
bundles.Add(new ScriptBundle("~/bundles/mediaqueries").Include(
"~/Scripts/css3-mediaqueries.js"));
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"));
bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/site.css"));
and is loaded in my view as such
@Styles.Render("~/Content/css")
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/fingrr")
<!--[if lt IE 9 ]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script src="@Url.Content("~/Scripts/css3-mediaqueries.js")" type="text/javascript"></script>
<![endif]-->
@Scripts.Render("~/bundles/modernizr")
Is there an issue between IE (v8.0?) and jquery 2.0.2? Or has anyone else encountered this that might have a fix?
Thanks!
Andy
jQuery 2.0+ drops support for IE8 and below.