| OLD | NEW |
| (Empty) |
| 1 <polymer-element name="polymer-body" extends="body"> | |
| 2 | |
| 3 <script> | |
| 4 | |
| 5 // upgrade polymer-body last so that it can contain other imported elements | |
| 6 document.addEventListener('polymer-ready', function() { | |
| 7 | |
| 8 Polymer('polymer-body', Platform.mixin({ | |
| 9 | |
| 10 created: function() { | |
| 11 this.template = document.createElement('template'); | |
| 12 var body = wrap(document).body; | |
| 13 var c$ = body.childNodes.array(); | |
| 14 for (var i=0, c; (c=c$[i]); i++) { | |
| 15 if (c.localName !== 'script') { | |
| 16 this.template.content.appendChild(c); | |
| 17 } | |
| 18 } | |
| 19 // snarf up user defined model | |
| 20 window.model = this; | |
| 21 }, | |
| 22 | |
| 23 parseDeclaration: function(elementElement) { | |
| 24 this.lightFromTemplate(this.template); | |
| 25 } | |
| 26 | |
| 27 }, window.model)); | |
| 28 | |
| 29 }); | |
| 30 | |
| 31 </script> | |
| 32 | |
| 33 </polymer-element> | |
| OLD | NEW |