Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Webshims Lib is a modular capability-based polyfill-loading library

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
build
demos
src
swfs/localStorage
tests
.gitignore
MIT-LICENSE.txt
build.xml
readme.md

readme.md

Webshims Lib - The polyfilling, capability based loading JavaScript Libary

Features

General Principles:

  • HTML5 compliant: correctly and accurately implemented (HTML5) Markup-, JS- and DOM-APIs
  • capability based loading: extremely lightweight in modern browsers
  • cross-browser support: All A-Graded browsers including latest version of Opera are tested
  • extendable: if we have not implemented a feature you want, you can easily implement it on your own

Implemented Features:

  • HTML5 shiv and innerShiv solution including basic CSS-support
  • canvas
  • HTML5 form features including: constraint validation and form widgets (input[range], input[date], input[time], input[datetime-local], output)
  • JSON (stringify and parse)
  • localStorage/sessionStorage
  • geolocation
  • ECMAScript 5 / JavaScript 1.8.5 features

How To Use


<script src="js-webshim/minified/polyfiller.js"></script> 

<script> 
    //load and implement all unsupported features 
    $.webshims.polyfill();

    //or only load a specific feature
    //$.webshims.polyfill('geolocation json-storage');
</script>

  • Wait till everything has been loaded and then use it:

<script> 
    $(function(){
        //work with JSON and localStorage 
        var userData = JSON.parse(localStorage.getItem('userData')) || {visits: 0};
        $('#visits').html(userData.visits);
        //...
    });
</script>

More information and demos here.

License

The Webshims Lib core is licensed under the MIT-License. Note: Webshims Lib uses many great third party scripts.

Questions?

If you have any questions, please feel free to ask them on the Using jQuery Plugins forum.

Please tag your questions with 'webshims' or 'polyfill'.

Release 1.6RC5

  • added details & summary element-support
  • improved/clean up documentation, fixed many typos, grammar... (jab)
  • improved english validationMessages (jab)
  • re-added combohandler support
  • fixed issue with language switching ($.webshims.activeLang not defined initially)
  • fixed checkValidity in Opera and in polyfilled browsers
  • fixed typo (Seldaek)
  • added support for older jQuery versions
  • fixed IE9 styling issue
  • fixed IE reopens datepicker sometimes
  • updated to jQuery 1.5.2
  • fixed many little bugs in old X-/C-graded browsers
  • fixed setting valueAsNumber/valueAsDate in Opera

Release 1.5.2

  • fix loading external files from file:// protocol
  • use jQuery UI 1.8.11
  • performance improvements using defineNodeName[s]Properties
  • improved placeholder
Something went wrong with that request. Please try again.