aboutsummaryrefslogtreecommitdiff
path: root/js/polyfills/dataset.min.js
diff options
context:
space:
mode:
authorEric Bidelman2012-04-10 22:47:35 -0700
committerEric Bidelman2012-04-10 22:47:35 -0700
commit9118fa551c30ecda1b0e78af6418284460822d75 (patch)
tree2dd32e17b1bd5a406952b22d7d727fe6d7044dcb /js/polyfills/dataset.min.js
parentba011027cea557a78a400959f9f04a8de456947e (diff)
downloadio-slides-remote-9118fa551c30ecda1b0e78af6418284460822d75.tar.gz
polyfills working for ios < 5
Diffstat (limited to 'js/polyfills/dataset.min.js')
-rw-r--r--js/polyfills/dataset.min.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/js/polyfills/dataset.min.js b/js/polyfills/dataset.min.js
new file mode 100644
index 0000000..3f2a564
--- /dev/null
+++ b/js/polyfills/dataset.min.js
@@ -0,0 +1,2 @@
1(function(){function c(){d=!0;this.removeEventListener("DOMAttrModified",c,!1)}function g(b){return b.replace(h,function(b,a){return a.toUpperCase()})}function e(){var b={};i.call(this.attributes,function(a){if(f=a.name.match(j))b[g(f[1])]=a.value});return b}var i=[].forEach,j=/^data-(.+)/,h=/\-([a-z])/ig,a=document.createElement("div"),d=!1,f;a.dataset==void 0&&(a.addEventListener("DOMAttrModified",c,!1),a.setAttribute("foo","bar"),Element.prototype.__defineGetter__("dataset",d?function(){if(!this._datasetCache)this._datasetCache=
2e.call(this);return this._datasetCache}:e),document.addEventListener("DOMAttrModified",function(a){delete a.target._datasetCache},!1))})(); \ No newline at end of file