Ticket #10427 (closed bug: invalid)
Creating custom elements is broken on IE7 and 8 using $('<...>').
|Reported by:||bmustiata||Owned by:||rwaldron|
Description (last modified by rwaldron) (diff)
Fiddle test case: http://jsfiddle.net/nmfCy/1/
Full-Patched : http://download.androidknight.com/jquery-1.6.4-patched.js
Description. The expected nodes to be added is: <customelement>
However in IE7/8 (IE9 works fine) two elements get created after innerHtml is set: <customelement>
</customelement> (!!) - yes, with the beginning slash character as tagName,
and all the content that should belong in the <customelement> is now a sibling living between the two elements.
This needs to work, since the HTML5 elements do match the criteria of unknown elements, and creating them programatically now breaks the DOM structure in IE7/8 (same example but with a canvas element instead: http://jsfiddle.net/nmfCy/2/).
To make matters worse the added elements (via innerHtml) are unknown html elements, that do not allow creating child elements into them.
However, if we create the same element with document.createElement('customelement') and we append this one to the DOM, we can add children elements into it.
The given patch adds the check for custom elements support, and if it does not exists, it then attempts to find and fix the eventually broken newly created custom elements (in the clean method).
The patch was tested against IE7, IE8, IE9, Chrome 14.0 and Firefox 7.0.1.
- Status changed from new to closed
- Resolution set to duplicate
- Keywords 1.8-discuss added
- Resolution duplicate deleted
- Status changed from closed to reopened
- Component changed from unfiled to manipulation
- Milestone changed from None to 1.8
comment:13 Changed 2 years ago by rwaldron
- Owner set to rwaldron
- Status changed from open to assigned
comment:19 Changed 2 years ago by rwaldron
- Status changed from assigned to closed
- Resolution set to invalid