simeydotme / svelte-range-slider-pips

Multi-Thumb, Accessible, Beautiful Range Slider with Pips
https://simeydotme.github.io/svelte-range-slider-pips/
Mozilla Public License 2.0
455 stars 42 forks source link

[suggestions] Add support for the usage of passive event listeners #62

Closed Rilliano closed 2 years ago

Rilliano commented 2 years ago

Describe the suggestion To import the performance is it possible to add support for passive event listeners for the touch and wheel events:

See Articles: https://web.dev/uses-passive-event-listeners/?utm_source=lighthouse&utm_medium=devtools https://www.webtips.dev/webtips/svelte/how-to-use-event-listeners-in-svelte

Thanks in advance.

simeydotme commented 2 years ago

hi @Rilliano .. I am not listening to scroll events, and as for touch events; the preventDefault is used to stop both click and touchend/touchstart events firing simultaneously (and thus breaking interactivity).

I see you shared an article from Lighthouse, may I ask; are you simply interested in lighthouse scores, or do you find an actual performance issue I can test and observe? As I haven't found any issues myself and I know Lighthouse is only doing static analysis (and poor at that).