W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2014

Re: Custom Elements: 'data-' attributes

From: Anne van Kesteren <annevk@annevk.nl>
Date: Fri, 9 May 2014 11:22:11 +0100
Message-ID: <CADnb78g8Sh3B5eXp1wORsEZFPRG27RHGN=YiNNqb5kbwHShqvw@mail.gmail.com>
To: Brian Kardell <bkardell@gmail.com>
Cc: Ryosuke Niwa <rniwa@apple.com>, Glenn Maynard <glenn@zewt.org>, Ian Hickson <ian@hixie.ch>, Wilson Page <wilsonpage@me.com>, Dimitri Glazkov <dglazkov@google.com>, "public-webapps@w3c.org" <public-webapps@w3c.org>
On Thu, May 8, 2014 at 6:49 PM, Brian Kardell <bkardell@gmail.com> wrote:
> What do the parsing rules say about what an attr may begin with? Is it
> plausible to just leading underscore or leading dash them as in CSS so that
> all that's really necessary is for HTML to avoid using those natively (not
> hard, cause, why would you) and then you provide an easy hatch for good
> authors and get decent protection without getting too crazy?

_test="" or -test="" works fine. However, if we advice developers to
mint attributes like that and APIs like ele._test() I'd imagine they'd
laugh at us. Not exactly a great improvement over the status quo.


-- 
http://annevankesteren.nl/
Received on Friday, 9 May 2014 10:22:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:14:24 UTC