bokeh
bokeh copied to clipboard
Investigate using `Object.preventExtensions()` on model instances
Currently nothing prevents users to set attributes/properties on models instances, like trying to set nonexistent InputWidget.enabled instead of the correct InputWidget.disabled. This is especially easy to mix up in all variants of CustomJS models, where no editor feedback is currently possible.
If that won't work, an alternative is to Proxy model instances just in CustomJS and alike, and intercept appropriately attribute setting. In that limited context slowness of Proxy objects will be negligible.