Ticket #12321 (closed bug: invalid)
Error: Object doesn't support property or method if Object.prototype.extend is set and Quirks mode is used
|Reported by:||timb||Owned by:|
If you set Object.prototype.extend, certain jQuery functions will throw an exception. I have reproduced this with IE8 and IE9 when running in Quirks mode. This is new to 1.8.0.
Here is a jsFiddle that should allow you to reproduce the issue: http://jsfiddle.net/eGwNw/
It doesn't appear that jsFiddle allows you to use a doctype that will force quirks mode, so here's what you need to do:
- Open the link in IE8 or IE9.
- Press F12 to open the IE debugger.
- Change Document Mode to Quirks Mode (you will get some errors from the jsFiddle site, as it's not meant to be run in Quirks Mode - just ignore them for now).
- Press the Run button. You should get the error.
If you switch to jQuery 1.7.2 and run it, you will see that the issue no longer occurs.
Please note that older versions of Visual Studio (such as 2003) had the following default doctype: <!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.0 TransitionalEN">
See here for more info: http://aspnetresources.com/articles/doctype
When 4.0 Transitional is used and the system identifier has not be specified, it will force most (or all?) browser to use Quirks Mode (source: http://en.wikipedia.org/wiki/Quirks_mode). The same occurs if 4.01 transitional is used without the system identifier. Therefore, there may be a number of legacy applications out there that would be impacted by this breaking change if they were to use jQuery 1.8.0.