-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Elements polyfill is myopic about SVG #169
Comments
Absolutely agree about the issue subject, we semi-consciously avoided thinking about SVG elements. Thanks for bringing it up.
Fwiw, This is almost the only thing that HTMLElementElement does. This is a general topic we need to discuss more fully I think (apart from the SVG support which would be good too). |
+1. It would be wonderful to be able to write higher-level svg-based charting libraries with custom elements. |
+1 for SVG support! |
+1 for SVG support. |
Closing this issue due to age and the release of version 1 release of Polymer - please feel free to re-open if this is incorrect. |
If I write this in Chrome:
and inspect the red circle, its prototype is SVGCircleElement.prototype. Likewise if I follow through with registering a definition, it stays "instanceof SVGCircleElement".
However if I write this:
then the circle becomes a HTMLUnknownElement.
In general it seems the polyfill assumes "extends" refers to HTML elements, and it also doesn't match up tag names of custom elements with what is on the prototype chain (for example if I make that extends="button", then my circle ends up with a prototype chain that leads to HTMLButtonElement.
The text was updated successfully, but these errors were encountered: