Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor to pass in configuration via a factory function #34

Open
weotch opened this issue Apr 14, 2021 · 0 comments
Open

Refactor to pass in configuration via a factory function #34

weotch opened this issue Apr 14, 2021 · 0 comments

Comments

@weotch
Copy link
Member

weotch commented Apr 14, 2021

I'm imagining a new API that is like:

import { makeInViewportMixin } from 'vue-in-viewport-mixin'
export default {
  mixins: [
    makeInViewportMixin({
      once: true,
      intersectionObserverOptions: {
        root: => document.getElementById('scroller')
      }
    })
  ]
}
@weotch weotch changed the title Refactor to pass in configuration via a class constructor Refactor to pass in configuration via a factory function Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant