diff --git a/README.md b/README.md index 0b9bcb3b..5aa5e55e 100644 --- a/README.md +++ b/README.md @@ -69,6 +69,10 @@ var doc = jsyaml.load('greeting: hello\nname: world'); Browser support is still buggy, and mostly done to run online demo. If you can help to improve browser compatibility and AMD support - rise pull request. +**Support of oldIEs** and some other prehistoric browsers is possible using +[es5-shims](https://github.com/kriskowal/es5-shim). Just include shims before +jsyaml to use it with outdated browsers. + ## API diff --git a/demo/index.html b/demo/index.html index dfb3437e..df6cd209 100644 --- a/demo/index.html +++ b/demo/index.html @@ -8,6 +8,7 @@ + diff --git a/demo/js/es5-shims.js b/demo/js/es5-shims.js new file mode 100644 index 00000000..6508bbf5 --- /dev/null +++ b/demo/js/es5-shims.js @@ -0,0 +1,1108 @@ +// vim: ts=4 sts=4 sw=4 expandtab +// -- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License +// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project) +// -- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA +// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License +// -- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License +// -- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License +// -- kossnocorp Sasha Koss XXX TODO License or CLA +// -- bryanforbes Bryan Forbes XXX TODO License or CLA +// -- killdream Quildreen Motta Copyright (C) 2011 MIT Licence +// -- michaelficarra Michael Ficarra Copyright (C) 2011 3-clause BSD License +// -- sharkbrainguy Gerard Paapu Copyright (C) 2011 MIT License +// -- bbqsrc Brendan Molloy (C) 2011 Creative Commons Zero (public domain) +// -- iwyg XXX TODO License or CLA +// -- DomenicDenicola Domenic Denicola Copyright (C) 2011 MIT License +// -- xavierm02 Montillet Xavier Copyright (C) 2011 MIT License +// -- Raynos Jake Verbaten Copyright (C) 2011 MIT Licence +// -- samsonjs Sami Samhuri Copyright (C) 2010 MIT License +// -- rwldrn Rick Waldron Copyright (C) 2011 MIT License +// -- lexer Alexey Zakharov XXX TODO License or CLA + +/*! + Copyright (c) 2009, 280 North Inc. http://280north.com/ + MIT License. http://github.com/280north/narwhal/blob/master/README.md +*/ + +// Module systems magic dance +(function (definition) { + // RequireJS + if (typeof define == "function") { + define(definition); + // YUI3 + } else if (typeof YUI == "function") { + YUI.add("es5", definition); + // CommonJS and