refactor(zone.js): remove usages of blacklist related to UNPATCHED_EVENTS (#38930)

Remove usages of blacklist around UNPATCHED_EVENTS configuration

PR Close #38930
This commit is contained in:
Joey Perrott
2020-09-21 14:27:44 -07:00
committed by Misko Hevery
parent ba3f4c26bb
commit 75610505c6
3 changed files with 26 additions and 26 deletions

View File

@ -351,7 +351,7 @@ export function patchEventTarget(
const compare =
(patchOptions && patchOptions.diff) ? patchOptions.diff : compareTaskCallbackVsDelegate;
const blackListedEvents: string[] = (Zone as any)[zoneSymbol('BLACK_LISTED_EVENTS')];
const unpatchedEvents: string[] = (Zone as any)[zoneSymbol('UNPATCHED_EVENTS')];
const passiveEvents: string[] = _global[zoneSymbol('PASSIVE_EVENTS')];
const makeAddListener = function(
@ -391,10 +391,10 @@ export function patchEventTarget(
passiveSupported && !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;
const options = buildEventListenerOptions(arguments[2], passive);
if (blackListedEvents) {
// check black list
for (let i = 0; i < blackListedEvents.length; i++) {
if (eventName === blackListedEvents[i]) {
if (unpatchedEvents) {
// check upatched list
for (let i = 0; i < unpatchedEvents.length; i++) {
if (eventName === unpatchedEvents[i]) {
if (passive) {
return nativeListener.call(target, eventName, delegate, options);
} else {