browser-legacy.ts 992 B

1234567891011121314151617181920212223242526272829
  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. /**
  9. * @fileoverview
  10. * @suppress {missingRequire}
  11. */
  12. import {eventTargetLegacyPatch} from './event-target-legacy';
  13. import {propertyDescriptorLegacyPatch} from './property-descriptor-legacy';
  14. import {registerElementPatch} from './register-element';
  15. (function(_global: any) {
  16. _global['__zone_symbol__legacyPatch'] = function() {
  17. const Zone = _global['Zone'];
  18. Zone.__load_patch('registerElement', (global: any, Zone: ZoneType, api: _ZonePrivate) => {
  19. registerElementPatch(global, api);
  20. });
  21. Zone.__load_patch('EventTargetLegacy', (global: any, Zone: ZoneType, api: _ZonePrivate) => {
  22. eventTargetLegacyPatch(global, api);
  23. propertyDescriptorLegacyPatch(api, global);
  24. });
  25. };
  26. })(typeof window !== 'undefined' && window || typeof self !== 'undefined' && self || global);