|
| 1 | +/** |
| 2 | +* @license |
| 3 | +* Copyright Google Inc. All Rights Reserved. |
| 4 | +* |
| 5 | +* Use of this source code is governed by an MIT-style license that can be |
| 6 | +* found in the LICENSE file at https://angular.io/license |
| 7 | +*/ |
| 8 | +(function (global, factory) { |
| 9 | + typeof exports === 'object' && typeof module !== 'undefined' ? factory() : |
| 10 | + typeof define === 'function' && define.amd ? define(factory) : |
| 11 | + (factory()); |
| 12 | +}(this, (function () { 'use strict'; |
| 13 | + |
| 14 | +/** |
| 15 | + * @license |
| 16 | + * Copyright Google Inc. All Rights Reserved. |
| 17 | + * |
| 18 | + * Use of this source code is governed by an MIT-style license that can be |
| 19 | + * found in the LICENSE file at https://angular.io/license |
| 20 | + */ |
| 21 | +Zone.__load_patch('shadydom', function (global, Zone, api) { |
| 22 | + var patchEventTargetMethods = Zone[Zone.__symbol__('patchEventTargetMethods')]; |
| 23 | + // https://github.com/angular/zone.js/issues/782 |
| 24 | + // in web components, shadydom will patch addEventListener/removeEventListener of |
| 25 | + // Node.prototype and WindowPrototype, this will have conflict with zone.js |
| 26 | + // so zone.js need to patch them again. |
| 27 | + var windowPrototype = Object.getPrototypeOf(window); |
| 28 | + if (windowPrototype && windowPrototype.hasOwnProperty('addEventListener')) { |
| 29 | + windowPrototype[Zone.__symbol__('addEventListener')] = null; |
| 30 | + windowPrototype[Zone.__symbol__('removeEventListener')] = null; |
| 31 | + patchEventTargetMethods(windowPrototype); |
| 32 | + } |
| 33 | + if (Node.prototype.hasOwnProperty('addEventListener')) { |
| 34 | + Node.prototype[Zone.__symbol__('addEventListener')] = null; |
| 35 | + Node.prototype[Zone.__symbol__('removeEventListener')] = null; |
| 36 | + patchEventTargetMethods(Node.prototype); |
| 37 | + } |
| 38 | +}); |
| 39 | + |
| 40 | +}))); |
0 commit comments