Bug Tracker

Opened 8 years ago

Last modified 5 years ago

#6485 closed feature

Solution for HTML5 in IE — at Version 6

Reported by: jonathantneal Owned by:
Priority: high Milestone: 1.7
Component: core Version: 1.4.4
Keywords: html5, innershiv, innershim, needsreview, 1.7-discuss Cc: paul.irish, SlexAxton
Blocked by: Blocking:

Description (last modified by paul.irish)

I wanted to propose some solutions to be used for some major HTML5 issues in IE6, IE7, and IE8, especially in regards to javascript and jQuery.

Issues / Solutions:

  1. HTML5 is not supported on a document, html5 elements will not properly contain contents
    • document.createElement('X') triggers support for 'X' element (you know this one, it's the "shiv I mean shim" method)
  2. HTML5 is not supported with innerHTML
    • HTML5 added with innerHTML is supported when the element being innerHTML'd is already appended to a shim'd document (or document fragment!)
  3. <HTML5_elements> become <:HTML5_elements> when element is cloneNode'd
    • use an alternate cloneNode function, the default is broken and should not be used in IE anyway (for example: it should not clone events)

Example of solutions, in action, with comments:

http://pastie.org/935834

Change History (6)

comment:1 Changed 7 years ago by Rick Waldron

Keywords: needsreview added
Priority: undecided

comment:2 Changed 7 years ago by Rick Waldron

Resolution: invalid
Status: newclosed

comment:3 Changed 7 years ago by dmethvin

Keywords: needsreview removed

Take a look at modernizr for this, it's kind of heavy to put into jQuery core because everyone would pay the price for it.

comment:4 Changed 7 years ago by SlexAxton

Cc: paul.irish SlexAxton added
Keywords: html5 innershiv innershim needsreview added
Milestone: 1.4.31.5
Priority: undecidedhigh
Resolution: invalid
Status: closedreopened
Version: 1.4.21.4.4

We've talked about different ways to handle this in the 1.5 feature list. I'm going to open this back up as something we are actively considering.

comment:5 Changed 7 years ago by paul.irish

#5327 is a duplicate of this ticket.

comment:6 Changed 7 years ago by paul.irish

Description: modified (diff)

The major problem is dealing with new elements either ajax'd in or created on the fly... issue #2 of Jon's above.

More detail from the closed dupe #5327 is here: : http://stackoverflow.com/questions/1191164/jquery-html5-append-appendto-and-ie

Test case: http://jsfiddle.net/DVnmE/

Remy's test case: http://jsbin.com/olizu

Note: See TracTickets for help on using tickets.