- From: <bugzilla@wiggum.w3.org>
- Date: Wed, 10 Feb 2010 09:27:55 +0000
- To: public-html-bugzilla@w3.org
http://www.w3.org/Bugs/Public/show_bug.cgi?id=8924
Summary: Custom attribute names in dataset
Product: HTML WG
Version: unspecified
Platform: All
URL: http://dev.w3.org/html5/spec/Overview.html#custom-data-
attribute
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: HTML5 spec proposals
AssignedTo: dave.null@w3.org
ReportedBy: csaba.matyi@gmail.com
QAContact: public-html-bugzilla@w3.org
CC: ian@hixie.ch, mike@w3.org, public-html@w3.org
The spec says that custom data must be a lowecase attribute in no namespace. It
suggests to use names like "data-doquery-range" and "data-jjo-range" and
defines an easy JavaScript accessor for data- attributes (node.dataset.x,
node.dataset.y, etc.).
I see inconvenient to access the "data-doquery-range" attribute, because of the
hyphen (node.dataset['doquery-range']). It would be better to convert the
lowercase data names to Camel case, like the conversion of CSS selectors to
JavaScript data members.
Using this conversion the dataset would easily access the "data-doquery-range"
by using node.dataset.doqueryRange.
This change would imply the modification of the following algorithms:
* The algorithm for getting the list of name-value pairs
* The algorithm for setting names to certain values
* The algorithm for deleting names
My proposal might also have other impacts, but I see no real reason for not
applying these conversions for custom attributes and making programmer's life
easier.
Regards,
Csaba
--
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Wednesday, 10 February 2010 09:28:05 UTC