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

Custom snapshot callbacks #19

Open
kettanaito opened this issue Nov 23, 2017 · 0 comments
Open

Custom snapshot callbacks #19

kettanaito opened this issue Nov 23, 2017 · 0 comments
Labels
Milestone

Comments

@kettanaito
Copy link
Owner

What

Need to consider custom callbacks (or multiple callbacks) for a snapshot.

Why

In case #3 or similar are implemented, they would need a respective callback functions.

How

new Observer({
  snapshots: [
    appear() {},
    disappear() {}
  ]
});

This may as well be combined with #18 so a resolver can return an object of which callback function it should call and whether it should call it under the current snapshot condition.

new Observer({
  snapshots: [
    resolver: (...) {
      return { should: Boolean, callback: 'myCallback' };
    },
    myCallback() {}
  ]
});
@kettanaito kettanaito added this to the Release 2.0 milestone Nov 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant