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

Side by Side Diff: packages/web_components/lib/CustomElements.js

Issue 2989763002: Update charted to 0.4.8 and roll (Closed)
Patch Set: Removed Cutch from list of reviewers Created 3 years, 4 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 unified diff | Download patch
« no previous file with comments | « packages/web_components/CHANGELOG.md ('k') | packages/web_components/lib/CustomElements.min.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * @license 2 * @license
3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. 3 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 * This code may only be used under the BSD style license found at http://polyme r.github.io/LICENSE.txt 4 * This code may only be used under the BSD style license found at http://polyme r.github.io/LICENSE.txt
5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS. txt 5 * The complete set of authors may be found at http://polymer.github.io/AUTHORS. txt
6 * The complete set of contributors may be found at http://polymer.github.io/CON TRIBUTORS.txt 6 * The complete set of contributors may be found at http://polymer.github.io/CON TRIBUTORS.txt
7 * Code distributed by Google as part of the polymer project is also 7 * Code distributed by Google as part of the polymer project is also
8 * subject to an additional IP rights grant found at http://polymer.github.io/PA TENTS.txt 8 * subject to an additional IP rights grant found at http://polymer.github.io/PA TENTS.txt
9 */ 9 */
10 // @version 0.7.21 10 // @version 0.7.23
11 if (typeof WeakMap === "undefined") { 11 if (typeof WeakMap === "undefined") {
12 (function() { 12 (function() {
13 var defineProperty = Object.defineProperty; 13 var defineProperty = Object.defineProperty;
14 var counter = Date.now() % 1e9; 14 var counter = Date.now() % 1e9;
15 var WeakMap = function() { 15 var WeakMap = function() {
16 this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__"); 16 this.name = "__st" + (Math.random() * 1e9 >>> 0) + (counter++ + "__");
17 }; 17 };
18 WeakMap.prototype = { 18 WeakMap.prototype = {
19 set: function(key, value) { 19 set: function(key, value) {
20 var entry = key[this.name]; 20 var entry = key[this.name];
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 }; 344 };
345 global.JsMutationObserver = JsMutationObserver; 345 global.JsMutationObserver = JsMutationObserver;
346 if (!global.MutationObserver) { 346 if (!global.MutationObserver) {
347 global.MutationObserver = JsMutationObserver; 347 global.MutationObserver = JsMutationObserver;
348 JsMutationObserver._isPolyfilled = true; 348 JsMutationObserver._isPolyfilled = true;
349 } 349 }
350 })(self); 350 })(self);
351 351
352 (function(scope) { 352 (function(scope) {
353 "use strict"; 353 "use strict";
354 if (!window.performance) { 354 if (!(window.performance && window.performance.now)) {
355 var start = Date.now(); 355 var start = Date.now();
356 window.performance = { 356 window.performance = {
357 now: function() { 357 now: function() {
358 return Date.now() - start; 358 return Date.now() - start;
359 } 359 }
360 }; 360 };
361 } 361 }
362 if (!window.requestAnimationFrame) { 362 if (!window.requestAnimationFrame) {
363 window.requestAnimationFrame = function() { 363 window.requestAnimationFrame = function() {
364 var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAni mationFrame; 364 var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAni mationFrame;
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 if (isReservedTag(name)) { 771 if (isReservedTag(name)) {
772 throw new Error("Failed to execute 'registerElement' on 'Document': Regist ration failed for type '" + String(name) + "'. The type name is invalid."); 772 throw new Error("Failed to execute 'registerElement' on 'Document': Regist ration failed for type '" + String(name) + "'. The type name is invalid.");
773 } 773 }
774 if (getRegisteredDefinition(name)) { 774 if (getRegisteredDefinition(name)) {
775 throw new Error("DuplicateDefinitionError: a type with name '" + String(na me) + "' is already registered"); 775 throw new Error("DuplicateDefinitionError: a type with name '" + String(na me) + "' is already registered");
776 } 776 }
777 if (!definition.prototype) { 777 if (!definition.prototype) {
778 definition.prototype = Object.create(HTMLElement.prototype); 778 definition.prototype = Object.create(HTMLElement.prototype);
779 } 779 }
780 definition.__name = name.toLowerCase(); 780 definition.__name = name.toLowerCase();
781 if (definition.extends) {
782 definition.extends = definition.extends.toLowerCase();
783 }
781 definition.lifecycle = definition.lifecycle || {}; 784 definition.lifecycle = definition.lifecycle || {};
782 definition.ancestry = ancestry(definition.extends); 785 definition.ancestry = ancestry(definition.extends);
783 resolveTagName(definition); 786 resolveTagName(definition);
784 resolvePrototypeChain(definition); 787 resolvePrototypeChain(definition);
785 overrideAttributeApi(definition.prototype); 788 overrideAttributeApi(definition.prototype);
786 registerDefinition(definition.__name, definition); 789 registerDefinition(definition.__name, definition);
787 definition.ctor = generateConstructor(definition); 790 definition.ctor = generateConstructor(definition);
788 definition.ctor.prototype = definition.prototype; 791 definition.ctor.prototype = definition.prototype;
789 definition.prototype.constructor = definition.ctor; 792 definition.prototype.constructor = definition.ctor;
790 if (scope.ready) { 793 if (scope.ready) {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 function wrapDomMethodToForceUpgrade(obj, methodName) { 946 function wrapDomMethodToForceUpgrade(obj, methodName) {
944 var orig = obj[methodName]; 947 var orig = obj[methodName];
945 obj[methodName] = function() { 948 obj[methodName] = function() {
946 var n = orig.apply(this, arguments); 949 var n = orig.apply(this, arguments);
947 upgradeAll(n); 950 upgradeAll(n);
948 return n; 951 return n;
949 }; 952 };
950 } 953 }
951 wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode"); 954 wrapDomMethodToForceUpgrade(Node.prototype, "cloneNode");
952 wrapDomMethodToForceUpgrade(document, "importNode"); 955 wrapDomMethodToForceUpgrade(document, "importNode");
953 if (isIE) {
954 (function() {
955 var importNode = document.importNode;
956 document.importNode = function() {
957 var n = importNode.apply(document, arguments);
958 if (n.nodeType == n.DOCUMENT_FRAGMENT_NODE) {
959 var f = document.createDocumentFragment();
960 f.appendChild(n);
961 return f;
962 } else {
963 return n;
964 }
965 };
966 })();
967 }
968 document.registerElement = register; 956 document.registerElement = register;
969 document.createElement = createElement; 957 document.createElement = createElement;
970 document.createElementNS = createElementNS; 958 document.createElementNS = createElementNS;
971 scope.registry = registry; 959 scope.registry = registry;
972 scope.instanceof = isInstance; 960 scope.instanceof = isInstance;
973 scope.reservedTagList = reservedTagList; 961 scope.reservedTagList = reservedTagList;
974 scope.getRegisteredDefinition = getRegisteredDefinition; 962 scope.getRegisteredDefinition = getRegisteredDefinition;
975 document.register = document.registerElement; 963 document.register = document.registerElement;
976 }); 964 });
977 965
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1032 } 1020 }
1033 if (document.readyState === "complete" || scope.flags.eager) { 1021 if (document.readyState === "complete" || scope.flags.eager) {
1034 bootstrap(); 1022 bootstrap();
1035 } else if (document.readyState === "interactive" && !window.attachEvent && (!w indow.HTMLImports || window.HTMLImports.ready)) { 1023 } else if (document.readyState === "interactive" && !window.attachEvent && (!w indow.HTMLImports || window.HTMLImports.ready)) {
1036 bootstrap(); 1024 bootstrap();
1037 } else { 1025 } else {
1038 var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImpor tsLoaded" : "DOMContentLoaded"; 1026 var loadEvent = window.HTMLImports && !window.HTMLImports.ready ? "HTMLImpor tsLoaded" : "DOMContentLoaded";
1039 window.addEventListener(loadEvent, bootstrap); 1027 window.addEventListener(loadEvent, bootstrap);
1040 } 1028 }
1041 })(window.CustomElements); 1029 })(window.CustomElements);
OLDNEW
« no previous file with comments | « packages/web_components/CHANGELOG.md ('k') | packages/web_components/lib/CustomElements.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698