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:

committed by
Misko Hevery

parent
8db865d9b0
commit
0dda8bf265
@ -1154,10 +1154,10 @@ describe('Zone', function() {
|
||||
it('should not be passive with global variable defined with passive false option', () => {
|
||||
testPassive('touchstart', 'defaultPrevented', {passive: false});
|
||||
});
|
||||
it('should be passive with global variable defined and also blacklisted', () => {
|
||||
it('should be passive with global variable defined and also unpatched', () => {
|
||||
testPassive('scroll', 'default will run', undefined);
|
||||
});
|
||||
it('should not be passive without global variable defined and also blacklisted', () => {
|
||||
it('should not be passive without global variable defined and also unpatched', () => {
|
||||
testPassive('wheel', 'defaultPrevented', undefined);
|
||||
});
|
||||
});
|
||||
@ -1376,7 +1376,7 @@ describe('Zone', function() {
|
||||
let hookSpy2 = jasmine.createSpy('spy2');
|
||||
let hookSpy3 = jasmine.createSpy('spy3');
|
||||
let logs: string[] = [];
|
||||
const isBlacklistedEvent = function(source: string) {
|
||||
const isUnpatchedEvent = function(source: string) {
|
||||
return source.lastIndexOf('click') !== -1;
|
||||
};
|
||||
const zone1 = Zone.current.fork({
|
||||
@ -1385,7 +1385,7 @@ describe('Zone', function() {
|
||||
parentZoneDelegate: ZoneDelegate, currentZone: Zone, targetZone: Zone, task: Task):
|
||||
any => {
|
||||
if ((task.type === 'eventTask' || task.type === 'macroTask') &&
|
||||
isBlacklistedEvent(task.source)) {
|
||||
isUnpatchedEvent(task.source)) {
|
||||
task.cancelScheduleRequest();
|
||||
|
||||
return zone2.scheduleTask(task);
|
||||
|
Reference in New Issue
Block a user