Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(728)

Unified Diff: pkg/polymer/lib/src/js/polymer/polymer-body.html

Issue 182193002: [polymer] interop with polymer-element and polymer.js (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/polymer/lib/src/js/polymer/polymer.js ('k') | pkg/polymer/lib/src/js/polymer/polymer.concat.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/lib/src/js/polymer/polymer-body.html
diff --git a/pkg/polymer/lib/src/js/polymer/polymer-body.html b/pkg/polymer/lib/src/js/polymer/polymer-body.html
new file mode 100644
index 0000000000000000000000000000000000000000..5f07a017cd543229619510cc78f2e4faa218a9a6
--- /dev/null
+++ b/pkg/polymer/lib/src/js/polymer/polymer-body.html
@@ -0,0 +1,33 @@
+<polymer-element name="polymer-body" extends="body">
+
+ <script>
+
+ // upgrade polymer-body last so that it can contain other imported elements
+ document.addEventListener('polymer-ready', function() {
+
+ Polymer('polymer-body', Platform.mixin({
+
+ created: function() {
+ this.template = document.createElement('template');
+ var body = wrap(document).body;
+ var c$ = body.childNodes.array();
+ for (var i=0, c; (c=c$[i]); i++) {
+ if (c.localName !== 'script') {
+ this.template.content.appendChild(c);
+ }
+ }
+ // snarf up user defined model
+ window.model = this;
+ },
+
+ parseDeclaration: function(elementElement) {
+ this.lightFromTemplate(this.template);
+ }
+
+ }, window.model));
+
+ });
+
+ </script>
+
+</polymer-element>
« no previous file with comments | « pkg/polymer/lib/src/js/polymer/polymer.js ('k') | pkg/polymer/lib/src/js/polymer/polymer.concat.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698