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
It would be nice to have a programmatic way of replacing the configuration and re-adapting the page. I've hacked my own copy to allow this, but I'm not sure whether the approach would be accepted as a pull request...
Basically, I made the following changes:
remove the aliasing of the config object's fields so that changed to ADAPT_CONFIG will be picked
up.
bind a global window.adapt variable to allow the client code to call adapt() after changing the
config.
Obviously, this whole thing could also be accomplished by wrapping the above in a reconfigure() method, which would allow the aliasing to be restored, too, but it would still require binding a global, which adapt currently doesn't.
If binding a global is a concern, it would be possible, I suppose to do that only if the initial config contains bindGlobal: true or something like that.
Anyway, I'd be happy to submit a pull request for this if there's any interest at all.
The text was updated successfully, but these errors were encountered:
It would be nice to have a programmatic way of replacing the configuration and re-adapting the page. I've hacked my own copy to allow this, but I'm not sure whether the approach would be accepted as a pull request...
Basically, I made the following changes:
up.
window.adapt
variable to allow the client code to calladapt()
after changing theconfig.
Obviously, this whole thing could also be accomplished by wrapping the above in a
reconfigure()
method, which would allow the aliasing to be restored, too, but it would still require binding a global, which adapt currently doesn't.If binding a global is a concern, it would be possible, I suppose to do that only if the initial config contains
bindGlobal: true
or something like that.Anyway, I'd be happy to submit a pull request for this if there's any interest at all.
The text was updated successfully, but these errors were encountered: