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

On Wed, Sep 28, 2011 at 11:19 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> 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.

Can you help me understand what the issues with fallback are? Perhaps
we could look at them one by one and see whether a solution lies
somewhere in their midst?

>
> 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:24:55 UTC