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