In Polymer, why use `<input is =" iron-input ">` instead of `<iron-input>`?
In a Polymer document ( https://elements.polymer-project.org/elements/iron-input ) I found:
<input is="iron-input" bind-value="{{myValue}}">
And in another white paper ( https://www.polymer-project.org/1.0/docs/devguide/registering-elements.html#type-extension ) I found:
<dom-module id="main-document-element">
<template>
<p>
Hi! I'm a Polymer element that was defined in the
main document!
</p>
</template>
<script>
HTMLImports.whenReady(function () {
Polymer({
is: 'main-document-element'
});
});
</script>
</dom-module>
<main-document-element></main-document-element>
I'm just wondering why the first <input is="iron-input" bind-value="{{myValue}}">cannot be written as <iron-input bind-value="{{myValue}}">.
Is it for compatibility, what makes polyfill easier?
+4