From 3a27e39241b30da968b13c771542d91d415d5064 Mon Sep 17 00:00:00 2001 From: "JiaLi.Passion" Date: Sun, 15 Jan 2017 01:11:26 +0900 Subject: [PATCH] fix #536, add notification api patch --- dist/webapis-media-query.js | 1 + dist/webapis-notification.js | 1 + gulpfile.js | 11 +++++++--- .../{web-api.ts => webapis-media-query.ts} | 0 lib/browser/webapis-notification.ts | 22 +++++++++++++++++++ test/browser/MediaQuery.spec.ts | 2 +- 6 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 dist/webapis-media-query.js create mode 100644 dist/webapis-notification.js rename lib/browser/{web-api.ts => webapis-media-query.ts} (100%) create mode 100644 lib/browser/webapis-notification.ts diff --git a/dist/webapis-media-query.js b/dist/webapis-media-query.js new file mode 100644 index 000000000..9ed5abe23 --- /dev/null +++ b/dist/webapis-media-query.js @@ -0,0 +1 @@ +!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n():"function"==typeof define&&define.amd?define(n):n()}(this,function(){"use strict";function e(e,n,t,r,i){var u=e[c];if(u)for(var o=0;o { + // patch Notification + patchNotification(_global); + + function patchNotification(_global: any) { + const Notification = _global['Notification']; + if (!Notification || !Notification.prototype) { + return; + } + + patchOnProperties(Notification.prototype, null); + } +})(typeof window === 'object' && window || typeof self === 'object' && self || global); diff --git a/test/browser/MediaQuery.spec.ts b/test/browser/MediaQuery.spec.ts index 1c812aa11..f88064cb4 100644 --- a/test/browser/MediaQuery.spec.ts +++ b/test/browser/MediaQuery.spec.ts @@ -6,7 +6,7 @@ * found in the LICENSE file at https://angular.io/license */ -import '../../lib/browser/web-api'; +import '../../lib/browser/webapis-media-query'; import {zoneSymbol} from '../../lib/common/utils'; import {ifEnvSupports} from '../test-util';