##// END OF EJS Templates
Adding a comment and renaming on_bulk_change to on_change
Sylvain Corlay -
Show More
@@ -266,7 +266,12 b' define(["widgets/js/manager",'
266 }
266 }
267 },
267 },
268
268
269 on_bulk_change: function(keys, callback, context) {
269 on_change: function(keys, callback, context) {
270 // on_change(["key1", "key2"], foo, context) differs from
271 // on("change:key1 change:key2", foo, context).
272 // If the widget attributes key1 and key2 are both modified,
273 // the second form will result in foo being called twice
274 // while the first will call foo only once.
270 this.on('change', function() {
275 this.on('change', function() {
271 if (keys.some(this.hasChanged, this)) {
276 if (keys.some(this.hasChanged, this)) {
272 callback.apply(context);
277 callback.apply(context);
General Comments 0
You need to be logged in to leave comments. Login now