JSFiddle - React, Tailwind, and code Playground
HTML
<script>Polymer={dom:'shadow'};</script>
<base href="https://polygit.org/*+:master/components/">
<link rel="import" href="polymer/polymer.html">
<link rel="import" href="paper-button/paper-button.html">
<dom-module id="x-foo">
<template>
<!-- Hackishly to give paper-button some properties. -->
<paper-button made-up-bound-number="[[myMadeUpNumber]]"
made-up-string="my made up string"
made-up-bound-string="[[undefined]]my made up bound string"
id="button"></paper-button>
</template>
</dom-module>
<x-foo></x-foo>
JavaScript
Polymer({
is: 'x-foo',
properties: {
myMadeUpNumber: {
type: Number,
value: 42,
}
},
ready: function() {
// Property defined dynamically and bound to [[myMadeUpNumber]] as Number.
console.log(this.$.button.madeUpBoundNumber === 42);
// Property not defined.
console.log(this.$.button.madeUpString === undefined);
// Property defined dynamically and bound to [[undefined]] + literal as String.
console.log(this.$.button.madeUpBoundString === 'my made up bound string');
},
});