Skip to content
This repository has been archived by the owner on Jan 22, 2020. It is now read-only.

lmc-eu/src-n-polyfill

Repository files navigation

src-N Polyfill

Javascript src-N proposal for responsive images polyfill

Only 2,3KB minified and gzipped.

Based on Proposal for RespImg Syntax.

Use

Load the polyfill file (preffer minified src-n-polyfill.min.js) and call window.srcnpolyfill() at the bottom of your mark-up or at DOM ready event.

  <script src="src-n-polyfill.min.js"></script>
  <script>
    window.srcnpolyfill();
  </script>
</body>

Browser support

Works out of the box for any modern browser supporting window.matchMedia and ES5 array functions.

If you need IE 8 or IE 9 support, use the corresponding polyfills.

Changelog

  • v0.5.2 Support unicode characters in URL
  • v0.5.1 Enable use with Browserify and Debowerify
  • v0.5.0 Fix a candidates order bug
  • v0.4.0 Rewritten scope and dropped support for IE <= 9
  • v0.3.0 jQuery independent
  • v0.2.0 Reorganize and edit bower dependencies
  • v0.1.0 Initial version

Bitdeli Badge