From f959b1c2db02a6bc8eaeb6c6a658cb9082ef1b4e Mon Sep 17 00:00:00 2001 From: Steve Orvell Date: Tue, 22 Jul 2014 12:25:40 -0700 Subject: [PATCH] make sure designed element does not get queued for registration. --- elements/design-host/design-host.html | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/elements/design-host/design-host.html b/elements/design-host/design-host.html index 434a63f7..27f11408 100644 --- a/elements/design-host/design-host.html +++ b/elements/design-host/design-host.html @@ -66,7 +66,8 @@ }, loadHtml: function(html, callback) { - var raw = document.createElement('div'); + // use a template to ensure the polymer-element does not upgrade + var raw = document.createElement('template'); raw.innerHTML = html; // remove imports var imports = raw.querySelectorAll('link[rel=import]').array(); @@ -74,7 +75,7 @@ i.remove(); }); // absorb polymer-element - this.polymerElement = raw.querySelector('polymer-element'); + this.polymerElement = raw.content.querySelector('polymer-element'); if (!this.polymerElement) { throw new Error('Must load a '); } @@ -86,6 +87,8 @@ // absorb template var template = this.polymerElement.querySelector('template'); if (template) { + // ensure template is owned by document so that its contents upgrade + document.adoptNode(template); // absorb styles, convert :host style var style = template.content.querySelector('style'); if (style) {