mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
Now Angular doesn't support add event listeners as passive very easily.
User needs to use `elem.addEventListener('scroll', listener, {passive: true});`
or implements their own EventManagerPlugin to do that.
Angular may finally support new template syntax to support passive event, for now,
this commit introduces a temp solution to allow user to define the passive event names
in zone.js configurations.
User can define a global varibale like this.
```
(window as any)['__zone_symbol__PASSIVE_EVENTS'] = ['scroll'];
```
to let all `scroll` event listeners passive.
PR Close #34503
|
||
|---|---|---|
| .. | ||
| error-rewrite.ts | ||
| events.ts | ||
| fetch.ts | ||
| promise.ts | ||
| timers.ts | ||
| to-string.ts | ||
| utils.ts | ||