- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Thu, 30 Oct 2008 14:17:33 -0700
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- CC: www-style@w3.org
Tab Atkins Jr. wrote: > If I'm reading it right, all of the data-* attributes are there, and > dataset is merely a convenience attribute. Without it, you'd always > have to use array notation to access those properties, due to the hyphen > in the names.. Frex, elem["data-id"] vs elem.dataset.id > <http://elem.dataset.id>. As far as I can tell, elem.dataset.id is elem.getAttributeNS(null, "data-id"), but elem["data-id"] is undefined unless the page sets it or something. > Can arbitrary DOM properties be matched against efficiently? Hard to say, and introduces weird circularity issues: div[offsetWidth=25] { width: 50 } and so forth... -Boris
Received on Thursday, 30 October 2008 21:18:19 UTC