Skip to content

Use interaction observer to detect viewport #182

@roderickhsiao

Description

@roderickhsiao

We could probably try to integrate intersection observer and fallback to the original logic if the browser doesnt support it.

https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API

Also there is issue that currently the scroll event is attached on window, so it might cause issue if the we are using overflow scroll

Support
https://caniuse.com/#feat=intersectionobserver

How do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions