I recently noticed that chrome converts data attributes data-*
to lower case.
e.g.
<div data-Me="awesome"></div>
will be converted to <div data-me="awesome"></div>
in Chrome Dev Tools.
When I call the attribute with javascript:
console.log(e.hasAttribute('data-Me'),e.hasAttribute('data-me'));
both return true.
So whats the standard way to name data attributes?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…