File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed
Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="UTF-8 ">
5+ < title > <my-element></ title >
6+
7+ <!-- Importing Web Component's Polyfill -->
8+ < script src ="bower_components/platform/platform.js "> </ script >
9+
10+ <!-- Importing Custom Elements -->
11+ < link rel ="import " href ="src/my-element.html ">
12+ </ head >
13+ < body >
14+
15+ <!-- Using Custom Elements -->
16+ < my-element > </ my-element >
17+
18+ </ body >
19+ </ html >
Original file line number Diff line number Diff line change 1+ <!-- Import Polymer -->
2+ < link rel ="import " href ="../bower_components/polymer/polymer.html ">
3+
4+ <!-- Define your custom element -->
5+ < polymer-element name ="my-element ">
6+
7+ < script >
8+ Polymer ( 'my-element' , {
9+ // Fires when an instance of the element is created
10+ created : function ( ) { } ,
11+
12+ // Fires when the "<polymer-element>" has been fully prepared
13+ ready : function ( ) { } ,
14+
15+ // Fires when the element was inserted into the document
16+ attached : function ( ) { } ,
17+
18+ // Fires when the element was removed from the document
19+ detached : function ( ) { } ,
20+
21+ // Fires when an attribute was added, removed, or updated
22+ attributeChanged : function ( attr , oldVal , newVal ) { }
23+ } ) ;
24+ </ script >
25+
26+ </ polymer-element >
You can’t perform that action at this time.
0 commit comments