Skip to content

Commit

Permalink
dataset test.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Jan 29, 2012
1 parent 8ec0b25 commit 4615428
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions feature-detects/dom-dataset.js
Original file line number Diff line number Diff line change
@@ -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.