6ef52533f725bf13c731b02d413ff62399b25358,bokeh/model.py,Model,js_on_event,#Model#Any#,367
Before Change
if not isinstance(event, str) and issubclass(event, Event):
event = event.event_name
if event not in self.js_event_callbacks:
self.js_event_callbacks[event] = []
for callback in callbacks:
if callback in self.js_event_callbacks[event]:
continue
self.js_event_callbacks[event].append(callback)
After Change
if not isinstance(event, str) and issubclass(event, Event):
event = event.event_name
old_callbacks = self.js_event_callbacks.get("event", [] )
new_callbacks = [ callback for callback in callbacks if callback not in old_callbacks ]
self.js_event_callbacks[event] = old_callbacks + new_callbacks
def js_link(self, attr, other, other_attr, attr_selector=None):
""" Link two Bokeh model properties using JavaScript.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances Project Name: bokeh/bokeh
Commit Name: 6ef52533f725bf13c731b02d413ff62399b25358
Time: 2020-08-12
Author: mattpap@gmail.com
File Name: bokeh/model.py
Class Name: Model
Method Name: js_on_event
Project Name: dmlc/gluon-nlp
Commit Name: 2c5f22199b46837b9801378ce172dcd13f125769
Time: 2018-07-17
Author: leonard@lausen.nl
File Name: gluonnlp/vocab/subwords.py
Class Name: NGramHashes
Method Name: _word_to_hashes
Project Name: bokeh/bokeh
Commit Name: 6ef52533f725bf13c731b02d413ff62399b25358
Time: 2020-08-12
Author: mattpap@gmail.com
File Name: bokeh/model.py
Class Name: Model
Method Name: js_on_event
Project Name: pyprob/pyprob
Commit Name: 7c8e1dd6c4e91d276929dbfc39f03709a7178627
Time: 2017-06-26
Author: atilimgunes.baydin@gmail.com
File Name: infcomp/modules.py
Class Name: Artifact
Method Name: polymorph