I came across this git https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md with shows how developer can improve scroll performance by adding 'passive listeners'. I first saw it when my chrome showed me warnings ( The exact warning is "Handling of 'touchstart' input event was delayed for 126 ms due to main thread being busy. Consider marking event handler as 'passive' to make the page more responsive.").
It seems like pretty easy implementation, The problem is that most of the time I'm not the one who attach listeners, The angular 2 platform does. I'm getting those warnings when I click on buttons with (click) and animations stats playing.
Is there a way to combine angular 2 listeners and passive listeners?
As of March 2018, this is still "in consideration" and has not been implemented. However, there's a small utility you can use to add them as a directive; the best way unfortunately requires compiler support.
This is being considered but not yet implemented
See also https://github.com/angular/angular/issues/8866 https://github.com/angular/angular/issues/11200 might also be related.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With