W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

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

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Wed, 28 Sep 2011 14:19:28 -0400
Message-ID: <4E836530.6080504@mit.edu>
To: public-webapps@w3.org
On 9/28/11 2:08 PM, Dimitri Glazkov wrote:
> So, we need a way to express in markup that a particular element is to
> be created with a particular behavior.

Yes.

> Since the tagName is the only
> identifying property of a DOM element that can't be changed, this
> brings us to... custom tag names.

Or a declarative map from tagnames to behavior that you put in your <head>.

The benefit of the latter over custom tag names is that it degrades much 
better in both semantic and presentational terms when the component is 
not available (whether due to lack of UA support or due to it having 
gone 404).

The drawback is when you only want to apply a component to _some_ of the 
nodes with that tag name in your DOM.

I'm not sure yet that I see a way to do the latter without custom tag 
names, but the fallback story for them is just _terrible_....  Going 
forward we can require a declarative map from custom tagnames to 
built-in tagnames to get fallback if the component fails to load or 
something, but that won't help UAs that don't support all the new stuff 
and that will hinder deployment by sites.

We could also consider ideas like a "component" attribute that cannot be 
removed and cannot be set outside the parser or something...  But that 
has its own issues.

-Boris
Received on Wednesday, 28 September 2011 18:19:55 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:47 GMT