Set up on_change events for bokeh server interactions.
551278
def set_server_callback(self, handle):
        
        if self.on_events:
            for event in self.on_events:
                handle.on_event(event, self.on_event)
        if self.on_changes:
            for change in self.on_changes:
                if change in ['patching', 'streaming']:
                    # Patch and stream events do not need handling on server
                    continue
                handle.on_change(change, self.on_change)
760861
def on_modified(self, event):
        """"""
        for delegate in self.delegates:
            if hasattr(delegate, "on_modified"):
                delegate.on_modified(event)
920143
function normalizeEvents (on) {
  /* istanbul ignore if */
  if (isDef(on[RANGE_TOKEN])) {
    // IE input[type=range] only supports `change` event
    const event = isIE ? 'change' : 'input'
    on[event] = [].concat(on[RANGE_TOKEN], on[event] || [])
    delete on[RANGE_TOKEN]
  }
}
189829
def on(self):
        """"""
        on_command = StandardSend(self._address,
                                  COMMAND_LIGHT_ON_0X11_NONE, 0xff)
        self._send_method(on_command,
                          self._on_message_received)
590064
function watchPrefsForChanges() {
        prefs.prefsObject.on("change", function (e, data) {
            if (data.ids.indexOf("enabled") > -1) {
                // Check if enabled state mismatches whether code-folding is actually initialized (can't assume
                // since preference change events can occur when the value hasn't really changed)
                var isEnabled = prefs.getSetting("enabled");
                if (isEnabled && !_isInitialized) {
                    init();
                } else if (!isEnabled && _isInitialized) {
                    deinit();
                }
            }
        });
    }
1003854
def _notify_add(self, slice_):
        """"""
        change = AddChange(self, slice_)
        self.notify_observers(change)
761287
async def enable_events(self) -> asyncio.Task:
        """"""
        return await self._connection.ws_connect(
            on_message=self._ws_on_message, on_error=self._ws_on_error
        )
713672
function setupViewportChangeEvent(mediaQueries, eventRegistry, namespace) {
    var _loop_1 = function (viewport) {
        matchMedia(viewport.query).addListener(function (mediaQueryList) {
            if (mediaQueryList.matches) {
                fireViewportChangeEvent(viewport.name, eventRegistry, namespace);
            }
        });
    };
    for (var _i = 0, mediaQueries_1 = mediaQueries; _i < mediaQueries_1.length; _i++) {
        var viewport = mediaQueries_1[_i];
        _loop_1(viewport);
    }
}
752585
def notify_change(self, change):
        """"""
        # Send the state to the frontend before the user-registered callbacks
        # are called.
        name = change['name']
        if self.comm is not None and self.comm.kernel is not None:
            # Make sure this isn't information that the front-end just sent us.
            if name in self.keys and self._should_send_property(name, getattr(self, name)):
                # Send new state to front-end
                self.send_state(key=name)
        super(Widget, self).notify_change(change)
62672
def on_change(self, attr, old, new):
        
        self._queue.append((attr, old, new))
        if not self._active and self.plot.document:
            self.plot.document.add_timeout_callback(self.process_on_change, 50)
            self._active = True
572340
private void onPerspectiveChanged(@Observes PluginSaved event) {
        Plugin plugin = event.getPlugin();
        String pluginName = plugin.getName();
        if (perspectiveIds.contains(pluginName)) {
            super.refresh();
        }
    }
38227
function onChange(_cm, changeObj) {
      var macroModeState = vimGlobalState.macroModeState;
      var lastChange = macroModeState.lastInsertModeChanges;
      while (changeObj) {
        lastChange.expectCursorActivityForChange = true;
        if (changeObj.origin == '+input' || changeObj.origin == 'paste'
            || changeObj.origin === undefined /* only in testing */) {
          var text = changeObj.text.join('\n');
          lastChange.changes.push(text);
        }
        // Change objects may be chained with next.
        changeObj = changeObj.next;
      }
    }
489938
def OnSelChanged(self, event):
        """"""
        # Get the selected item object
        item = event.GetItem()
        obj = self.leftPanel.model.ItemToObject(item)
        if isinstance(obj, compass.Survey):
            l = [
                'Survey Name: %s' % obj.name,
                'Survey Date: %s' % obj.date,
                'Comment: %s' % obj.comment,
                'Team: %s' % ', '.join(obj.team),
                'Surveyed Footage: %0.1f' % obj.length,
                '',
                ]
            l.extend(['  '.join(['%s: %s' % (k,v) for (k,v) in shot.items()]) for shot in obj.shots])
            self.display.SetLabel(str('\n'.join(l)))
        else:
            self.display.SetLabel('')
571827
function onStateChanged(opts, that) {
        var eventProcessor = {
          resize: function resize(that) {
            if (opts && opts.onResize) {
              opts.onResize.call(that, that);
            } else if (this.onResize) {
              this.onResize.call(that, that);
            }
          },
          move: function move() {}
        };
        if (that.state in eventProcessor) {
          eventProcessor[that.state].call(this, that);
        }

        if (opts && opts.onStateChanged) {
          opts.onStateChanged.call(that, that);
        } else if (this.onStateChanged) {
          this.onStateChanged.call(that, that);
        }
        return true;
      }
1225518
function onChange(evt, path) {
    if (!ctx._ready) return; //block change propagation if model isnt ready
    path = ctx._name + "." + path;
    ctx.trigger(evt, path);
  }
228914
function () {
			Event.addListener(this.el, "change", this.onChange, this, true);
			Event.addFocusListener(this.el, this.onFocus, this, true);
			Event.addBlurListener(this.el, this.onBlur, this, true);
		}
897326
def _on_change(self):
        """"""
        if callable(self.__callback):
            self.__callback((self._family, self._size, self._bold, self._italic, self._underline, self._overstrike))