webapis-notification.js 1020 B

123456789101112131415161718192021222324252627282930313233
  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. * @license
  15. * Copyright Google Inc. All Rights Reserved.
  16. *
  17. * Use of this source code is governed by an MIT-style license that can be
  18. * found in the LICENSE file at https://angular.io/license
  19. */
  20. Zone.__load_patch('notification', function (global, Zone, api) {
  21. var Notification = global['Notification'];
  22. if (!Notification || !Notification.prototype) {
  23. return;
  24. }
  25. var desc = Object.getOwnPropertyDescriptor(Notification.prototype, 'onerror');
  26. if (!desc || !desc.configurable) {
  27. return;
  28. }
  29. api.patchOnProperties(Notification.prototype, null);
  30. });
  31. })));