Polymerjs Hello world
Simple Hello World program in Polymerjs
by Dhanesh Mane
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/webcomponentsjs/0.7.21/webcomponents-lite.min.js "></script>
<link rel="import"
href="https://www.polymer-project.org/1.0/components/polymer/polymer.html">
<hello-world></hello-world>
JavaScript
/* To register a new element, call the Polymer function, which registers a new element with the browser. */
Polymer({
is: "hello-world", /* custom element’s name must contain dash (-) */
/* Registering an element associates a tag name with a prototype, so you can add properties and methods to your custom element. */
ready: function() {
this.textContent = "Hello World"
}
});