1 | 'use strict';
|
---|
2 | /**
|
---|
3 | * @license Angular v12.0.0-next.0
|
---|
4 | * (c) 2010-2020 Google LLC. https://angular.io/
|
---|
5 | * License: MIT
|
---|
6 | */
|
---|
7 | /**
|
---|
8 | * @license
|
---|
9 | * Copyright Google LLC All Rights Reserved.
|
---|
10 | *
|
---|
11 | * Use of this source code is governed by an MIT-style license that can be
|
---|
12 | * found in the LICENSE file at https://angular.io/license
|
---|
13 | */
|
---|
14 | Zone.__load_patch('shadydom', (global, Zone, api) => {
|
---|
15 | // https://github.com/angular/zone.js/issues/782
|
---|
16 | // in web components, shadydom will patch addEventListener/removeEventListener of
|
---|
17 | // Node.prototype and WindowPrototype, this will have conflict with zone.js
|
---|
18 | // so zone.js need to patch them again.
|
---|
19 | const HTMLSlotElement = global.HTMLSlotElement;
|
---|
20 | const prototypes = [
|
---|
21 | Object.getPrototypeOf(window), Node.prototype, Text.prototype, Element.prototype,
|
---|
22 | HTMLElement.prototype, HTMLSlotElement && HTMLSlotElement.prototype, DocumentFragment.prototype,
|
---|
23 | Document.prototype
|
---|
24 | ];
|
---|
25 | prototypes.forEach(function (proto) {
|
---|
26 | if (proto && proto.hasOwnProperty('addEventListener')) {
|
---|
27 | proto[Zone.__symbol__('addEventListener')] = null;
|
---|
28 | proto[Zone.__symbol__('removeEventListener')] = null;
|
---|
29 | api.patchEventTarget(global, [proto]);
|
---|
30 | }
|
---|
31 | });
|
---|
32 | });
|
---|