Re: data-* attributes [was: Re: ISSUE-41/ACTION-97 decentralized-extensibility]

On Mon, Oct 19, 2009 at 1:27 PM, Leif Halvard Silli
<xn--mlform-iua@xn--mlform-iua.no> wrote:
> Tab Atkins Jr. On 09-10-19 19.11:
>> I can't tell from searching around on the svgweb demos how it uses
>> data-* attributes, but this really shouldn't be a problem in practice.
>
> From the SVGweb quick-start:
>
> ]]If your HTML page and the SVG Web library are in different directories,
> you also must provide a data-path HTML 5 attribute pointing to where the SVG
> Web files are.[[
>
>> If svgweb uses data-svgweb-* attributes, frex, then the chance of
>> clashing with another library is basically nil.  Before starting any
>> new library one should probably google for a bit to make sure that
>> one's preferred name for the project isn't already being used.
>
>
> @data-path seemed pretty generic. And in my mind (or in a code example I
> Googled) they used it on <object>, which already has @data.

Yeah, just using @data-path is a pretty bad practice.  ;_;  That's
precisely the sort of thing that *will* lead to name clashes.  Pretty
much only authors using data-* for self-written scripts should ever
use plain words like that - all libraries should definitely prefix
their data-* attributes.

~TJ

Received on Monday, 19 October 2009 19:54:17 UTC