knockout / tko

🥊 Technical Knockout – The Monorepo for Knockout.js (4.0+)
http://www.tko.io
Other
273 stars 34 forks source link

`options.bindingGlobals` can't be changed at runtime #166

Open danieldickison opened 2 years ago

danieldickison commented 2 years ago

When using the prebuild knockout or reference builds, because the tko binding provider encapsulates the global options that were set when it was built, setting options.bindingGlobals has no effect. We currently work around this by doing:

ko.options.bindingGlobals = {...};
ko.bindingProvider.setGlobals(ko.options.bindingGlobals);

I'm not sure it's really necessary to change this behavior, but it might be good to spell out which of the options are evaluated at build-time vs runtime.