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

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

--- Comment #28 from Dimitri Glazkov <dglazkov@chromium.org> ---
(In reply to comment #24)
> It seems super weird to me to do createElement("x-x") and get an element
> back whose localName is not x-x and which in addition has an attribute
> defined!
> 
> Again as I said in
> http://lists.w3.org/Archives/Public/public-webapps/2013JanMar/0371.html
> already if you want to explain what the DOM is doing by exposing the guts,
> this kind of behavior does not help one bit.

I agree it's super-weird, and would love to have your ideas on this.

I can't think of a way we can get around this problem. The issue at hand is
that just checking localName has always been enough. With introduction of
custom elements, it isn't any longer. We've changed an invariant. This is the
bill for collateral damages.

Now, had we begun with an element.isa("button") function, which traverses
element's inheritance chain to determine the answer, we'd be all set today :)
#hindsight2020

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

Received on Thursday, 14 February 2013 21:58:57 UTC