[Bug 20913] [Custom]: What does inheriting from existing HTML element really mean?

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20913

--- Comment #30 from Dimitri Glazkov <dglazkov@chromium.org> ---
(In reply to comment #29)
> I think we should not break the createElement invariant of argument passed
> equals local name. I would be okay with adding a parameter to createElement
> for the is="" attribute I think, 

Do you see this as a dictionary argument for supplying element attribute
values?

> though if the long term game plan is
> constructors, lets just use those and not try to shoehorn new world into old
> world.

Long term game plan is constructors. The mid-term dichotomy, however is
somewhat maddening. I shudder imagining Web developer Bob trying to correctly
determine how an element Foo should be constructed.

a) If Foo is an existing HTML element, use createElement only
b) If Foo is a custom element that doesn't inherit from any existing HTML
element, use either createElement or constructor
c) If Foo is a custom element that does inherit from an existing HTML element,
use constructor only.
c.1) .. or use a new createElement API with "is" attribute argument.

Woe to Bob. Especially if colleague Jill decided that Foo should benefit from
inheriting from an existing HTML element. But maybe I am worrying too much :)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Saturday, 16 February 2013 18:36:12 UTC