Search code examples
polymerweb-componentcustom-elementpolymer-2.x

Extending native HTML elements and Polymer 2.0


Is there a way to extend native elements (eg. HTMLInputElement, HTMLTableElement etc) instead of Polymer.Element ?


Solution

  • Short answer to your question is not as of now. The reason behind the same is that all the browsers have not agreed to implement this that's why polymer has not implemented it yet.

    Polymer does not currently support extending built-in elements. The custom elements spec provides a mechanism for extending built-in elements, such as and . The spec calls these elements customized built-in elements. Customized built-in elements provide many advantages (for example, being able to take advantage of built-in accessibility features of UI elements like and ). However, not all browser makers have agreed to support customized built-in elements, so Polymer does not support them at this time.