Download & Extend

Update HTML5 shim to version 3

Project:Drupal core
Version:8.x-dev
Component:javascript
Category:task
Priority:major
Assigned:Unassigned
Status:active
Issue tags:html5, mobile

Issue Summary

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/

Comments

#1

Title:Update HTML5 shim to latest version» Update HTML5 shim to version 3

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.)

AttachmentSizeStatusTest resultOperations
1389058-1-html5-shim-v3.patch3.97 KBIdlePASSED: [[SimpleTest]]: [MySQL] 34,379 pass(es).View details | Re-test

#2

Status:active» needs review

Needs review, of course.

#3

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.

#4

Status:needs review» reviewed & tested by the community

#5

Status:reviewed & tested by the community» fixed

Thanks! Committed/pushed to 8.x.

#6

Status:fixed» closed (fixed)

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

#7

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.

#8

Status:fixed» closed (fixed)

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

#9

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.

#10

Priority:normal» major
Status:fixed» active

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