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

Using prototype #36

Closed
marcandre opened this issue Mar 27, 2014 · 1 comment
Closed

Using prototype #36

marcandre opened this issue Mar 27, 2014 · 1 comment
Labels

Comments

@marcandre
Copy link
Collaborator

I want to make a small modification to the code so that the object we're building would have a prototype, which would be the current methods.

This would have the advantage that instead of $.featherlight.methods.open.call(this) one could simply do this.open().

It would also make it easier/better for extensions I think

One thing I'm considering is merging the config with the object, i.e. instead of self.config.closeOnClick, why not self.closeOnClick directly?

This would also blur the difference between the callbacks like afterOpen and the method like open. In the doc it would be clear that one is meant to be overridden and not the other, but both could be.

We could set self.config = self for compatibility, so both accesses work?

@noelboss thoughts on this?

@marcandre
Copy link
Collaborator Author

Mostly done & pushed. The rest in branch for 0.4

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