Ticket #14074 (closed bug: fixed)
jQuery 1 throws an error on window ready when there is an element in the DOM with the id 'nodeName'
|Reported by:||me@…||Owned by:|
When triggering the window ready event jQuery 1, since version 1.8.0, throws the error:
Uncaught TypeError: Object #<HTMLSpanElement> has no method 'toLowerCase'
on the line:
var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
The error is thrown when an element exists in the DOM with the id: "nodeName" or window.nodeName is defined as something
This is caused by passing the window object into acceptData, which is meant for DOM Elements. When the nodeName property is defined on the window object to be anything which doesn't have a toLowerCase function, the error is thrown.
JSFiddle test case: http://jsfiddle.net/6HWPr/5/
Bug originally posted to StackOverflow: http://stackoverflow.com/q/17329025/772035
- Priority changed from undecided to low
- Status changed from new to open
- Component changed from unfiled to core
- Status changed from open to closed
- Resolution set to fixed