From c33dd11e2a0b6facc1599f485087d5d2a859a3de Mon Sep 17 00:00:00 2001 From: Xotic750 Date: Tue, 26 Jan 2016 10:34:07 +0100 Subject: [PATCH] Add information about patching order when using ES compatibility shims, along with an example. https://github.com/es-shims/es5-shim/issues/377 Add cdnjs links for latest available versions --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 59778b65..8397a60f 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,8 @@ `es5-shim.js` and `es5-shim.min.js` monkey-patch a JavaScript context to contain all EcmaScript 5 methods that can be faithfully emulated with a legacy JavaScript engine. +**Note:** As `es5-shim.js` is designed to patch the native Javascript +engine, it should be the library that is loaded first. `es5-sham.js` and `es5-sham.min.js` monkey-patch other ES5 methods as closely as possible. For these methods, as closely as possible to ES5 @@ -166,6 +168,17 @@ simply `npm install` and `npm test`. provisions of this method, which you cannot possibly obtain in legacy engines. +### Example of applying ES compatability shims in a browser project + +```html + + + + + + + +``` [npm-url]: https://npmjs.org/package/es5-shim [npm-version-svg]: http://versionbadg.es/es-shims/es5-shim.svg [travis-svg]: https://travis-ci.org/es-shims/es5-shim.svg