The old version of the HTML5 shim required using an InnerShiv to make HTML5 elements inserted with jQuery work properly.

But there's a new version of the shim out (released Dec 22) that fixes this. As the InnerShiv website states:

STOP! Don't use innerShiv!
html5shiv now patches for the innerHTML issue! Update html5shiv and you won't have to use innerShiv anymore:

http://html5shiv.googlecode.com/

CommentFileSizeAuthor
#1 1389058-1-html5-shim-v3.patch3.97 KBjohnalbin

Comments

johnalbin’s picture

Title: Update HTML5 shim to latest version » Update HTML5 shim to version 3
Issue tags: +mobile, +html5
StatusFileSize
new3.97 KB

One thing I've noticed from the new version's source is that it removed the IE js-based conditional comments (that's the /*@cc_on @*/ bits from the old version. We need to double check if that means anything for Drupal's use of html5.js (I haven't looked at the details of how Drupal is using it.)

johnalbin’s picture

Status: Active » Needs review

Needs review, of course.

johnalbin’s picture

I just looked at how HTML5.js is added over in the original issue #1077878: Add HTML5shiv to core. It looks like we are fine with the removal of the /*@cc_on comments since we are wrapping the HTML5.js in a conditional comment.

jacine’s picture

Status: Needs review » Reviewed & tested by the community
catch’s picture

Status: Reviewed & tested by the community » Fixed

Thanks! Committed/pushed to 8.x.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sun’s picture

Status: Closed (fixed) » Fixed

html5shiv is moving pretty fast: https://github.com/aFarkas/html5shiv/tags

Whereas the minified release doesn't really follow as fast and also seems to contain weird changes:
http://code.google.com/p/html5shiv/source/browse/trunk/html5.js

(pre3.5 should never have been ended up in the released version)

However, the tagged downloads on github are plain tarballs from the original source, not the minified script.

Perhaps we should include it remotely, as suggested on the project page on http://code.google.com/p/html5shiv/ ?

<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

Another difference I see is that we're including it with:

        'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE),

but the suggested code (as visible above) actually uses lt IE 9. In terms of strict version comparison basics, lt IE 9 can match versions that lte IE 8 is not able to match (typically development versions and so on; it depends on the exact version comparison algorithms of Internet Explorer whether it catches everything as intended or not). lt IE 9, as suggested on the html5shiv project page, looks more bullet-proof to me.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jacine’s picture

Status: Closed (fixed) » Fixed

I agree lt IE 9 would be better. We should change that. Not sure if we should just do it here or create a new issue?

As far as including the Shiv remotely, that's not a good idea.

sun’s picture

Priority: Normal » Major
Status: Fixed » Active

Re-opening. We cannot release with an outdated version.

effulgentsia’s picture

Title: Update HTML5 shim to version 3 » Update HTML5 shim to version 3.5
Issue tags: +Novice

Sounds like we just need an updated minified file and an update to the browser version string.

nod_’s picture

Priority: Major » Normal
Issue tags: +revisit before beta

The html5shiv doesn't add or change functionality for core, it works today, not major.

hass’s picture

klonos’s picture

Title: Update HTML5 shim to version 3.5 » Update HTML5 shim to the latest version (currently 3.6 RC1)

I'm keeping an eye on this issue and on html5shiv versions (the current source header says 3.6RC1 actually).

I agree with Théodore's comment in #12. Instead of keep opening and closing this issue here as new html5shiv versions come out, let's just keep it open but leave it to normal priority (so that it doesn't interfere with the major tasks threshold). The tag to revisit suffices to make sure we don't loose track of this and that we'll ship with the latest version once D8 final is ready. Now, if one finds the time to update to the most current one from time to time as we go, it wouldn't hurt ;)

As for the printshiv Alexander mentions in #13, I think it was included with html5shiv at some point - I just cannot recall the exact version that started including it. I guess the code was separated later on (not on its own - you either choose html5shiv with or w/o printshiv). Anyways, if we want to support seamlessly both display and print preview with html5, then we should make sure we use the printshiv version.

hass’s picture

I looked into source and code size and the print one has a special section in the code. File size of the print version is nearly doubled. If print part is included i would wonder, but less kb are always better... Docs on the html5shim page are not really helpful to find out... Maybe someone else know better?

klonos’s picture

Title: Update HTML5 shim to the latest version (currently 3.6 RC1) » Update HTML5 shim to the latest version (currently 3.6 final)

3.6 final is out.

klonos’s picture

Title: Update HTML5 shim to the latest version (currently 3.6 final) » Update html5shiv-printshiv to the latest (minified) version - currently 3.6 final.

We should use html5shiv-printshiv.js instead. Updated the issue title to reflect that.

I'd like to also mention here #1341792: [meta] Ship minified versions of external JavaScript libraries where it was proposed/discussed that we should include both minified and non-minified versions of the libs. I don't know if it makes sense to do something similar here - just pointing it out for discussion. #1537198: Add a Production/Development toggle too.

BTW...

html5shiv.js ~9kb
html5shiv-printshiv.js ~15kb
html5shiv-min.js ~2.3kb
html5shiv-printshiv-min.js ~4kb

andrewmacpherson’s picture

Title: Update html5shiv-printshiv to the latest (minified) version - currently 3.6 final. » Update html5shiv-printshiv to the latest (minified) version - currently 3.6.2 final.
Issue tags: +Accessibility

Bartik is now using the <main> element, but the version of html5.js currently in D8 does not include main.

<main> was added to the upstream library December 2012.
See https://github.com/aFarkas/html5shiv/issues/81

klonos’s picture

...was about to update the issue myself. Thanx ;)

alanburke’s picture

Title: Update html5shiv-printshiv to the latest (minified) version - currently 3.6.2 final. » Remove HTML5shive from core now that IE8 support has been dropped
Status: Active » Needs work

Drupal 8 support has been dropped.
This shiv should be removed from core.
See #1999948: Add HTML5shiv for contrib support

alanburke’s picture

Title: Remove HTML5shive from core now that IE8 support has been dropped » Remove HTML5shiv from core now that IE8 support has been dropped

Correct typo in title.

nod_’s picture

Dries is not up for removing the shim #1993334-8: Add HTML5shiv to Stable and Classy only . I guess we're keeping it for now.

catch’s picture

Status: Needs work » Closed (duplicate)

Marking this as duplicate.

hass’s picture

Title: Remove HTML5shiv from core now that IE8 support has been dropped » Update html5shiv-printshiv to the latest (minified) version - currently 3.6.2 final
Status: Closed (duplicate) » Needs work

There is still a need for this. My themes support all browsers back to IE6.

nod_’s picture

Status: Needs work » Closed (duplicate)
hass’s picture

Status: Closed (duplicate) » Needs work

This is not the html5shiv-printshiv. We need to remove the non-print one and replace it withe the print one.

nod_’s picture

Well, IE8 and under anymore are "no longer fully supported": http://drupal.org/node/1569578. Also depending on #1993334: Add HTML5shiv to Stable and Classy only the shiv might not even make it in the final release.

If you'd like a specific version it can ship with your theme. It's pretty trivial to override a css or js file from the theme info file now.

hass’s picture

Internet Explorer 6, 7 and 8 no longer fully supported

No longer FULLY supported does not mean it's NOT supported. Don't overlook this small difference, please. This means it is still supported, but we do not waste years to get a theme running on it. :-)

I know that I can add it to the themes and I do this already, however suxxx D7 is missing #865536: drupal_add_js() is missing the 'browsers' option.

catch’s picture

Issue summary: View changes
Status: Needs work » Postponed
Issue tags: -revisit before beta
sun’s picture

mgifford’s picture

Title: Update html5shiv-printshiv to the latest (minified) version - currently 3.6.2 final » Update html5shiv-printshiv to the latest (minified) version - currently 3.7.2
nod_’s picture

Status: Postponed » Closed (fixed)

Up to date now.