-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Webshim to add polyfill for HTML5 form validation in browsers #2324
Conversation
… such as adding support in Safari on Mac.
Note: webshim currently not available to install via composer, so it has been added to the directory "/javascript" instead. |
this is a very 'heavy' commit. 313 files? seems like a lot for what I think it is doing. can you explain more about the benefits of including this? what does it do? |
@craigh In this particular case, a browser such as Safari on Mac does not fully support the "required" attribute via HTML5 validation. Therefore, forms are able to be submitted without proper client validation. Webshim provides a variety of polyfills. For the installer, only the polyfills for "forms" is loaded. Even though only the polyfill for "forms" is needed for the installer, all other shims from the library are provided in the core, if developers need them for loading other polyfills, as desired. Once this pull request is merged, other core modules that have forms can make similar use of proper HTML5 validation. So, it's not only a matter of supporting the "required" attribute cross-browser, but we will be able to properly support HTML5 validation, using attributes such as validation via regex and other valid attributes. |
Adding Webshim to add polyfill for HTML5 form validation in browsers
👍 |
ping @phaidon FYI |
I opened at ticket at the Webshim project, requesting support to be able to install via composer. In the meantime, the library is located at /javascript/js-webshim. If a package for composer is made available, the library can be installed to /vendor later on. |
At least the whole dev folder could have been removed, no? This would probably lower the overall size a lot. |
@cmfcmf Then, the same can be said about all other libraries where we add both the minified and unminified versions. I would think we need to provide both. (But, have sites only link to the minified version for production use.) |
Adding Webshim to add polyfill for HTML5 form validation in browsers, such as adding support in Safari on Mac.
This corrects the installer.