You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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 dothis.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 notself.closeOnClick
directly?This would also blur the difference between the callbacks like
afterOpen
and the method likeopen
. 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?
The text was updated successfully, but these errors were encountered: