This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9828 - Update "Embedding custom non-visible data" with guidance for library authors to avoid naming collisions
Summary: Update "Embedding custom non-visible data" with guidance for library authors ...
Status: CLOSED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/spec/elements...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 03:35 UTC by Adrian Bateman [MSFT]
Modified: 2010-10-04 14:45 UTC (History)
4 users (show)

See Also:


Attachments

Description Adrian Bateman [MSFT] 2010-06-02 03:35:43 UTC
Based on the conversation between Tony and Jonas at:
http://lists.w3.org/Archives/Public/public-html/2010May/0034.html

Suggest that the text at the end of the section "Embedding custom non-visible data" be changed to:

JavaScript libraries may use the custom data attributes, as they are considered to be part of the page on which they are used. Authors of libraries that are reused by many authors are encouraged to include their name in the attribute names, to reduce the risk of clashes. Library authors are also encouraged to make their name customizable by the page author in order to resolve clashes between libraries (including different versions of the same library).

For example, a library called "DoQuery" could use attribute names like data-doquery-range, and a library called "jJo" could use attributes names like data-jjo-range. The jJo library could also provide clash resolution through an API call like jjo.setDataPrefix("jjo2"), after which the previous example would change to data-jjo2-range.

[The last sentence of each paragraph is new.]
Comment 1 Ian 'Hixie' Hickson 2010-08-11 21:14:40 UTC
This seems reasonable in principle. I'll look at it more carefully once I'm back to going through the bugs (I'm dealing with the backlog of e-mails first, since some had been waiting for far too long).
Comment 2 Ian 'Hixie' Hickson 2010-09-23 17:36:17 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Partially Accepted
Change Description: see diff given below
Rationale: I added equivalent sentences, though not quite using the same phrasing.
Comment 3 Adrian Bateman [MSFT] 2010-09-30 18:59:12 UTC
Thanks.