10 lines
231 B
JavaScript
Raw Normal View History

2014-03-09 14:43:33 -06:00
// 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");
});