Skip to content

passive event handler #98

@CommanderRaiker

Description

@CommanderRaiker

Hello,

can you update your lib to prevent the following verbose message in edge browser?

coloris.min.js:6 [Violation]Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

I'm not deep enough into the topic, but I was able to eliminate the message with the following change:

e.addEventListener(t, l)

becomes:

e.addEventListener(t, l, { passive: true})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions