Question

The new forms attributes and tags in HTML5 are great. Unfortunately, there is only limited support for these in Chrome and Firefox, and essentially no support of these in IE9 and below.

I have investigated using Modernizr and HTML5 polyfills to polyfill this functionality in browsers lacking native support. However, there seems to be a large number of polyfills for HTML5 forms functionality, such as webshims lib, webforms2 and h5f (see for example the listing at https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-Browser-Polyfills) and I am not sure which one or ones I should invest the time in learning.

Which one of these HTML5 forms polyfills would give me the broadest coverage in terms of HTML5 features and browser coverage?

Was it helpful?

Solution

I have used Webshims Lib and like it because:

  • It runs 'more lightweight' if a browser supports more HTML5 form features natively (which, of course, should do any good polyfill).
  • You can simply use the declarative markup (attributes) of HTML5 forms in all cases.
  • The project seems to be more 'alive' than others.

By the way, the Webshims creator answered another question on stackoverflow quite convincingly: html5 forms with polyfills - is it worth it?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top