eddiemf / vue-affix

A Vue.js plugin that affixes an element on the window while scrolling based on a relative element
MIT License
405 stars 38 forks source link

Use {passive: true} for the scroll event listener #55

Closed tchapi closed 2 months ago

tchapi commented 4 years ago

Hi,

Would it be possible to add an option (or maybe, always set it) so we could ad {passive: true} to the event listener ? This would improve performance in many cases (and improve audits with tools like Lighthouse for instance)

I'm talking about this line : https://github.com/eddiemf/vue-affix/blob/dba91fcb67fe2c34ef971ce0f67c304466bf5541/src/affix.vue#L479

Thanks !

tchapi commented 4 years ago

well