OLD | NEW |
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 Loading... |
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 Loading... |
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); |
OLD | NEW |