Are there plans to add an adapter (or something), so that one can define a 
polymer component using as much of the V1 custom spec 
<http://w3c.github.io/webcomponents/spec/custom/> as possible?  Something 
like:


<dom-module id="flag-icon"> 
  <template>
   <div>Country Code: [[CountryCode]]</div>
</template> 
</dom>




<script>

class FlagIcon extends HTMLElement {
  constructor() {
    super();
    this._countryCode = null;
  }

  static get observedAttributes() { return ["country"]; }

  attributeChangedCallback(name, oldValue, newValue) {
    // name will always be "country" due to observedAttributes
    this._countryCode = newValue;
    this._updateRendering();
  }
  connectedCallback() {
    this._updateRendering();
  }

  get country() {
    return this._countryCode;
  }
  set country(v) {
    this.setAttribute("country", v);
  }
}

Polymer.registerV1CustomElement(FlagIcon)




</script>


Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/f7588c46-5d54-4b80-aaf6-ff29dfb83c38%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to