3 ms·
That doesn't seem like much of an improvement over what already works, other than the namespacing. Is there a reason they chose the attribute "data-whatever" t
by sam_in_nyc 18y ago
That doesn't seem like much of an improvement over what already works, other than the namespacing. Is there a reason they chose the attribute "data-whatever" to map to "dataset.whatever" instead of just "data.whatever"? I can create my own attributes, such as _data_id and _data_name, and it's accessible through getAttribute(). It just won't validate, which doesn't bother me too much, since it makes things very convenient.
Alas, I'm not here to gripe to you. Is there a way to suggest support for embedding data other than text in attributes? In your experience, are "they" open to new ideas? Is it a time consuming process?
- olavk 18y agoThe "data" prefix is indeed for the sake of namespacing. This is actually quite useful since you can validate and e.g. find typos in ordinary attributes while still having your custom data attributes. If you have some good ideas for HTML5, you just post a well-argued message on the open mailing list (http://www.whatwg.org/mailing-list http://www.whatwg.org/mailing-list), and it will be considered.