Closed dave closed 11 years ago
We should see three buttons. What we see is:
As per spec, custom elements that are derivations of existing DOM elements (other than HTMLElement) must use the is
syntax.
This is necessary because various browsers have legacy code that expects the localName
(e.g.) of a <button>
to always be button
. This is why the is
syntax was invented.
Excellent, thanks. Perhaps the Custom Elements intro page (http://www.polymer-project.org/platform/custom-elements.html) could do with mentioning that... It doesn't really make it clear:
Eek, yes, that's a problem. Thanks for pointing that out.
Closing this since it's not an MDV bug.
Updated the docs to be more clear on type extension custom elements.
https://github.com/Polymer/CustomElements/commit/bf36b5a9c85d3e1cd837faab23a586aca7ee6a7c
When I define a custom element that inherits from button with the document.register syntax, it can't be created using the syntax. Creating from code with new XFoo(); works, as does
Here's a demo:
http://jsfiddle.net/y7R5s/12/