From 88600aae4f1b9181173ecad6a598be5c808924fe Mon Sep 17 00:00:00 2001 From: Daniel Freedman Date: Mon, 9 Dec 2013 12:36:51 -0800 Subject: [PATCH] Make the upgrade order of CustomElements polyfill top down instead of bottom up. Fixes #85 --- src/CustomElements.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CustomElements.js b/src/CustomElements.js index dc8d15f..b299419 100644 --- a/src/CustomElements.js +++ b/src/CustomElements.js @@ -218,11 +218,11 @@ if (useNative) { implement(element, definition); // flag as upgraded element.__upgraded__ = true; + // lifecycle management + created(element); // there should never be a shadow root on element at this point // we require child nodes be upgraded before `created` scope.upgradeSubtree(element); - // lifecycle management - created(element); // OUTPUT return element; }