#11620 closed bug (wontfix)
Creating custom element with inline attributes broken in IE
Reported by: | c0d3rg1rl | Owned by: | |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.7.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$('<content456 />').attr('id', 'content456') works.
$('<content789 id="content789" />') fails.
Testcase "fail": http://jsfiddle.net/fuNth/
If "old school" document.createElement('content789') is used, it works with IE:
Testcase "old school": http://jsfiddle.net/fuNth/1/
Discussion in IRC-channel pointed to a possible bug in createDocumentFragment or similar.
Change History (3)
comment:1 Changed 11 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
Additional info for interested readers:
The above "fail" testcase does not work with IE7 and IE8 on Windows XP.
It does work with IE9 on Windows 7.
comment:3 Changed 11 years ago by
Right, once the world gets to HTML5 there are very specific rules about how the document should be parsed in the face of unknown tags or syntax errors. Even so, it is not a good idea to make up your own tags outside of an XML document.
Creating "custom" elements in old IE is broken, which is why newer HTML5 elements must be specially created via shims. jQuery does some internal work to make it easy for manipulating HTML5 elements, but does not provide a mechanism for creating arbitrary elements in archiac browsers.