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

Unified Diff: third_party/polymer/v0_8/components-chromium/polymer/src/lib/dom-module-extracted.js

Issue 1162563004: Upgrade to 1.0 and switch clients to dom-repeat where needed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a layout import and remove the gzipped webanimation in reproduce.sh Created 5 years, 7 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
Index: third_party/polymer/v0_8/components-chromium/polymer/src/lib/dom-module-extracted.js
diff --git a/third_party/polymer/v0_8/components-chromium/polymer/src/lib/dom-module-extracted.js b/third_party/polymer/v0_8/components-chromium/polymer/src/lib/dom-module-extracted.js
deleted file mode 100644
index d4a8715e1d0838d0f1bec8ee3febbc8411d41b2f..0000000000000000000000000000000000000000
--- a/third_party/polymer/v0_8/components-chromium/polymer/src/lib/dom-module-extracted.js
+++ /dev/null
@@ -1,67 +0,0 @@
-
-
-(function() {
-
- var modules = {};
-
- var DomModule = function() {
- return document.createElement('dom-module');
- };
-
- DomModule.prototype = Object.create(HTMLElement.prototype);
-
- DomModule.prototype.constructor = DomModule;
-
- DomModule.prototype.createdCallback = function() {
- var id = this.id || this.getAttribute('name') || this.getAttribute('is');
- if (id) {
- this.id = id;
- modules[id] = this;
- }
- };
-
- DomModule.prototype.import = function(id, slctr) {
- var m = modules[id];
- if (!m) {
- // If polyfilling, a script can run before a dom-module element
- // is upgraded. We force the containing document to upgrade
- // and try again to workaround this polyfill limitation.
- forceDocumentUpgrade();
- m = modules[id];
- }
- if (m && slctr) {
- m = m.querySelector(slctr);
- }
- return m;
- };
-
- // NOTE: HTMLImports polyfill does not
- // block scripts on upgrading elements. However, we want to ensure that
- // any dom-module in the tree is available prior to a subsequent script
- // processing.
- // Therefore, we force any dom-modules in the tree to upgrade when dom-module
- // is registered by temporarily setting CE polyfill to crawl the entire
- // imports tree. (Note: this should only upgrade any imports that have been
- // loaded by this point. In addition the HTMLImports polyfill should be
- // changed to upgrade elements prior to running any scripts.)
- var cePolyfill = window.CustomElements && !CustomElements.useNative;
- if (cePolyfill) {
- var ready = CustomElements.ready;
- CustomElements.ready = true;
- }
- document.registerElement('dom-module', DomModule);
- if (cePolyfill) {
- CustomElements.ready = ready;
- }
-
- function forceDocumentUpgrade() {
- if (cePolyfill) {
- var script = document._currentScript || document.currentScript;
- if (script) {
- CustomElements.upgradeAll(script.ownerDocument);
- }
- }
- }
-
-})();
-

Powered by Google App Engine
This is Rietveld 408576698