This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27976 - [Custom]: type extensions should be available as custom tags, not only through <baseTag is="...">
Summary: [Custom]: type extensions should be available as custom tags, not only throug...
Status: RESOLVED MOVED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14968
  Show dependency treegraph
 
Reported: 2015-02-07 18:52 UTC by Randy Harmon
Modified: 2015-07-06 08:09 UTC (History)
4 users (show)

See Also:


Attachments

Description Randy Harmon 2015-02-07 18:52:01 UTC
It seems to me that it's unnecessarily limiting to require that users specify the base tag type and also the extension tag.  It seems to prevent the direct use of semantic tags which happen to use a non-generic html tag prototype.

This might be simply a clarity issue, where in 11.2 Type Extension Example, you could specify that <button is=tequila-button> is equivalent to <tequila-button>.
Comment 1 Boris Zbarsky 2015-02-07 21:44:19 UTC
If you want the HTML spec (and hence browsers) to think it's a button, you can't call it <tequila-button>, because both the HTML spec and browser implementations are in terms of the localName of the element.  So are browser extensions, various web libraries, and so forth.

This has been discussed at quite some length several times already.  Doing this in a green-field design might have made sense, but at this point we're talking about boiling the ocean.
Comment 2 Randy Harmon 2015-02-08 21:25:05 UTC
OK.  Thanks for the info.

Seems worth an aside in the doc, just to clarify that for current compatibility reasons, a native element cannot be considered a native element by the browser if it is extended via is="".
Comment 3 Randy Harmon 2015-02-08 21:26:08 UTC
s/cannot/can only/
Comment 4 markg 2015-02-19 03:48:52 UTC
I have not seen this stated very explicitly anywhere. How about a note in the spec at someplace like this location:

http://w3c.github.io/webcomponents/spec/custom/#custom-tag-example

It might make it clear like this:

"If you want a custom element to extend a native element like <button>, then you cannot use a custom tag name for it. Instead, you must use the native element tagname with the @is attribute, something like <button is="my-button">. It will not work to use a custom tag such as <my-button> to extend <button> (HTMLButtonElement prototype).

"Saying it another way, custom tagnames can only be used when you are not extending a native element (other than the default HTMLElement)."
Comment 5 Hayato Ito 2015-07-06 08:09:42 UTC
Moved to https://github.com/w3c/webcomponents/issues/147