Permalink
Browse files

dataset test.

  • Loading branch information...
1 parent 8ec0b25 commit 46154285bb79b61a816c3de92e0005eb00f11033 @paulirish paulirish committed Jan 29, 2012
Showing with 9 additions and 0 deletions.
  1. +9 −0 feature-detects/dom-dataset.js
@@ -0,0 +1,9 @@
+
+// dataset API for data-* attributes
+// test by @phiggins42
+
+Modernizr.addTest('dataset', function(){
+ var n = document.createElement("div");
+ n.setAttribute("data-a-b", "c");
+ return !!(n.dataset && n.dataset.aB === "c");
+});

0 comments on commit 4615428

Please sign in to comment.