Skip to content

Is it possible to use Passive Event Listeners to improve performance? #38

Closed
@ARDde

Description

@ARDde

In trackWindowScroll.js you are using normal event listeners. If you use Passive Event Listeners you get a better performance on scrolling:

https://developers.google.com/web/updates/2016/06/passive-event-listeners

All you have to do is to add a third parameter (true) to the listener.

Example:
window.addEventListener('resize', this.delayedScroll, true);

Best regards
Marcel

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions