webapis-notification.js 616 B

123456789101112131415161718192021
  1. 'use strict';
  2. /**
  3. * @license Angular v<unknown>
  4. * (c) 2010-2025 Google LLC. https://angular.io/
  5. * License: MIT
  6. */
  7. function patchNotifications(Zone) {
  8. Zone.__load_patch('notification', (global, Zone, api) => {
  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. });
  19. }
  20. patchNotifications(Zone);