W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

Re: Behavior Attachment Redux, was Re: HTML element content models vs. components

From: Roland Steiner <rolandsteiner@google.com>
Date: Mon, 3 Oct 2011 18:32:22 +0900
Message-ID: <CACFPSpiJ4fXm7VCijxSF8X20rL39H2TD2vghuXs2VmPTTou=pQ@mail.gmail.com>
To: Dominic Cooney <dominicc@google.com>
Cc: Ian Hickson <ian@hixie.ch>, "Tab Atkins Jr." <jackalmage@gmail.com>, "Edward O'Connor" <eoconnor@apple.com>, public-webapps@w3.org
If I may briefly summarize the pros and cons of every approach discussed:


- element name is inherently immutable
- can provide arbitrary API, can (but does not have to) derive from
arbitrary HTML element
- best performance (in instantiation, CSS selector matching)
- accessibility only for shadow tree contents, no accessibility for host
element unless ARIA roles are specified
- parsing issues in special circumstances (<table>, auto-closing <p>, etc.)
- no/limited fallback (limited: user provides fallback as content of
<X-MYWIDGET>, won't work in special places like within tables)
- makes it easy to conflate semantics and representation

<button IS=MYWIDGET>

- fallback behavior as per HTML element
- accessibility as per HTML element + shadow tree contents
- binding only at creation, or immediately thereafter
- API is that of host element, +alpha
- add'l APIs ignored for accessibility
- harder to implement: there's a window during parsing (before reading the
button) where it's still an ordinary button, requiring binding to be added
- immutability of 'is' attribute not immediately obvious to authors
- unclear what happens if a HTML element with intrinsic shadow DOM is
assigned a CSS binding


- fallback behavior as if un-styled
- accessibility
- mutability depending on medium, etc.
- host element stays unchanged
- dynamic binding is hard to implement
- shadow DOM dependent on rendering tree (something we explicitly wanted to
- API immutable that of host element
- unclear what happens if a HTML element with (intrinsic or explicit) shadow
DOM is assigned a CSS binding as well

Does the above look about right?

- Roland
Received on Monday, 3 October 2011 09:33:15 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:36 UTC