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

Side by Side Diff: polymer_1.2.3/bower_components/webcomponentsjs/MutationObserver.js

Issue 1581713003: [third_party] add polymer 1.2.3 (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: 1.2.3 Created 4 years, 11 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
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.5 10 // @version 0.7.20
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 17 matching lines...) Expand all
38 var entry = key[this.name]; 38 var entry = key[this.name];
39 if (!entry) return false; 39 if (!entry) return false;
40 return entry[0] === key; 40 return entry[0] === key;
41 } 41 }
42 }; 42 };
43 window.WeakMap = WeakMap; 43 window.WeakMap = WeakMap;
44 })(); 44 })();
45 } 45 }
46 46
47 (function(global) { 47 (function(global) {
48 if (global.JsMutationObserver) {
49 return;
50 }
48 var registrationsTable = new WeakMap(); 51 var registrationsTable = new WeakMap();
49 var setImmediate; 52 var setImmediate;
50 if (/Trident|Edge/.test(navigator.userAgent)) { 53 if (/Trident|Edge/.test(navigator.userAgent)) {
51 setImmediate = setTimeout; 54 setImmediate = setTimeout;
52 } else if (window.setImmediate) { 55 } else if (window.setImmediate) {
53 setImmediate = window.setImmediate; 56 setImmediate = window.setImmediate;
54 } else { 57 } else {
55 var setImmediateQueue = []; 58 var setImmediateQueue = [];
56 var sentinel = String(Math.random()); 59 var sentinel = String(Math.random());
57 window.addEventListener("message", function(e) { 60 window.addEventListener("message", function(e) {
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 record.nextSibling = nextSibling; 336 record.nextSibling = nextSibling;
334 forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) { 337 forEachAncestorAndObserverEnqueueRecord(e.relatedNode, function(options) {
335 if (!options.childList) return; 338 if (!options.childList) return;
336 return record; 339 return record;
337 }); 340 });
338 } 341 }
339 clearRecords(); 342 clearRecords();
340 } 343 }
341 }; 344 };
342 global.JsMutationObserver = JsMutationObserver; 345 global.JsMutationObserver = JsMutationObserver;
343 if (!global.MutationObserver) global.MutationObserver = JsMutationObserver; 346 if (!global.MutationObserver) {
344 })(this); 347 global.MutationObserver = JsMutationObserver;
348 JsMutationObserver._isPolyfilled = true;
349 }
350 })(self);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698