if not all(isinstance(x, CustomJS) for x in callbacks):
raise ValueError("not all callback values are CustomJS instances")
if event in self.properties():
event = "change:%s" % event
old = {k: [cb for cb in cbs] for k, cbs in self.js_property_callbacks.items()}
if event not in self.js_property_callbacks:
self.js_property_callbacks[event] = []
for callback in callbacks:
After Change
if not all(isinstance(x, CustomJS) for x in callbacks):
raise ValueError("not all callback values are CustomJS instances")
descriptor = self.lookup(event, raises=False)
if descriptor is not None:
event = f"change:{descriptor.name}"
old = {k: [cb for cb in cbs] for k, cbs in self.js_property_callbacks.items()}