Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which HTML5 forms javascript polyfill to has the broadest feature and browser reach?

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?

like image 298
Joe Alfano Avatar asked Jan 09 '12 16:01

Joe Alfano


People also ask

What is a polyfill in JavaScript?

A polyfill is a piece of code (usually JavaScript on the Web) used to provide modern functionality on older browsers that do not natively support it.

What is polyfill IO used for?

What is Polyfill.io? It's a service which accepts a request for a set of browser features and returns only the polyfills that are needed by the requesting browser.

Is polyfill a JS library?

Most often, it refers to a JavaScript library that implements an HTML5 or CSS web standard, either an established standard (supported by some browsers) on older browsers, or a proposed standard (not supported by any browsers) on existing browsers. Formally, "a polyfill is a shim for a browser API."

Which choice is not a value of the type attribute of the input element?

Which of the following is not a type of attribute for input tag? Explanation: Day is not defined in the pre-defined attribute list of input tag. Week attribute defines week and year when used as attribute in input tag. Month specifies month and year when it is accessed in input tag.


1 Answers

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?

like image 114
Jeroen Avatar answered Oct 27 '22 01:10

Jeroen