webapis-notification.ts 599 B

123456789101112131415161718
  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. Zone.__load_patch('notification', (global: any, Zone: ZoneType, api: _ZonePrivate) => {
  9. const Notification = global['Notification'];
  10. if (!Notification || !Notification.prototype) {
  11. return;
  12. }
  13. const desc = Object.getOwnPropertyDescriptor(Notification.prototype, 'onerror');
  14. if (!desc || !desc.configurable) {
  15. return;
  16. }
  17. api.patchOnProperties(Notification.prototype, null);
  18. });