4 ms·
Modernizr detects supported input types: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/inputtypes.js https://github.com/Modernizr/Modernizr
by kemayo 9y ago
Modernizr detects supported input types: https://github.com/Modernizr/Modernizr/blob/master/feature-detects/inputtypes.js https://github.com/Modernizr/Modernizr/blob/master/feature-d...
It's basically just making an <input>, setting its @type and seeing if that sticks, then setting a known-invalid value and seeing if that sticks.