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

Unified Diff: pkg/custom_element/lib/custom-elements.debug.js

Issue 36303003: Closing register/upgrade timing hole primarily impacting IE (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | pkg/custom_element/lib/custom-elements.min.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/custom_element/lib/custom-elements.debug.js
diff --git a/pkg/custom_element/lib/custom-elements.debug.js b/pkg/custom_element/lib/custom-elements.debug.js
index 07e93804514da025fc5db252325e12e9436c61c0..510dc2cea79cb52e089d49cf6129125b59c2991c 100644
--- a/pkg/custom_element/lib/custom-elements.debug.js
+++ b/pkg/custom_element/lib/custom-elements.debug.js
@@ -1063,7 +1063,7 @@ if (useNative) {
// force our .constructor to be our actual constructor
definition.prototype.constructor = definition.ctor;
// if initial parsing is complete
- if (scope.ready) {
+ if (scope.ready || scope.performedInitialDocumentUpgrade) {
// upgrade any pre-existing nodes of this type
scope.upgradeAll(document);
}
@@ -1385,6 +1385,7 @@ function bootstrap() {
CustomElements.parser.parse(document);
// one more pass before register is 'live'
CustomElements.upgradeDocument(document);
+ CustomElements.performedInitialDocumentUpgrade = true;
// choose async
var async = window.Platform && Platform.endOfMicrotask ?
Platform.endOfMicrotask :
« no previous file with comments | « no previous file | pkg/custom_element/lib/custom-elements.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698