[x] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)
What kind of change does this PR introduce? (check one with "x")
[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:
What is the current behavior? (You can also link to an open issue here)
Angular spies on every event handler that is attached to the document root element and processes change detection whenever an event is dispatched by the browser. That's pretty bad for performance.
What is the new behavior?
This PR changes EventTargetInterruptOptions to attach event handlers outside the Angular zone so that no change detection is processed for each event.
Does this PR introduce a breaking change? (check one with "x")
[ ] Yes
[x] No
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Coverage increased (+0.003%) to 99.356% when pulling b502b084db6270e9ea7e3525230021d7375a0968 on StevenLiekens:feature/run-outside-angular into 2e1aaaf5dfa380844a2b5a2aeec47981fd7f9826 on HackedByChinese:master.
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (check one with "x")
What is the current behavior? (You can also link to an open issue here) Angular spies on every event handler that is attached to the document root element and processes change detection whenever an event is dispatched by the browser. That's pretty bad for performance.
What is the new behavior? This PR changes
EventTargetInterruptOptions
to attach event handlers outside the Angular zone so that no change detection is processed for each event.Does this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications: ...
Other information: