Register a callback to be invoked whenever the browser
history changes, including using forward and back buttons.
@private
@method onUpdateURL
@param callback {Function}
353283
function (callback) {
      var _this = this;

      var guid = _emberMetalUtils.guidFor(this);

      _emberViewsSystemJquery.default(window).on('popstate.ember-location-' + guid, function (e) {
        // Ignore initial page load popstate event in Chrome
        if (!popstateFired) {
          popstateFired = true;
          if (_this.getURL() === _this._previousURL) {
            return;
          }
        }
        callback(_this.getURL());
      });
    }
149641
function(callback) {
		this.history.push('create image');
		var buff = new Buffer(this.width * this.height * 4);
		buff.fill(0);
		this.data = buff;
		callback.call(this);
	}
713312
function listener(store, history) {
  // console.clear()
  const pathname = history.location.pathname
  checkToken()
  store.dispatch({ type: 'UpdatePathname', payload: pathname })
  if (store.getState().app.pathnameChange) {
    console.warn('routeChangeTrue')
    store.dispatch(initializeLayout())
    store.dispatch(initializeApp())
    switch (pathname) {
      case '/login':
        store.dispatch(initializeLogin())
        break
      default:
        break
    }
  }
}
1081016
function _callback(changed_keys) {
      if (intersection(keys_to_watch_for_changes, changed_keys).length) {
        // only update the state if a key we care about has changed
        var state_update_obj = {};
        keys_to_watch_for_changes.forEach(function (k) {
          return state_update_obj[k] = store._store[k];
        });
        this.setState(state_update_obj);

        // if some other custom callback is required by the component
        // call that function as well
        if (additonal_callback) {
          additonal_callback(changed_keys);
        }
      }
    }
1201459
public final void addCallback(StatusCallback callback) {
        synchronized (callbacks) {
            if (callback != null && !callbacks.contains(callback)) {
                callbacks.add(callback);
            }
        }
    }
842007
function(callback)
    {
        function mycallback(mimeType, content)
        {
            this._originalContent = content;
            callback(mimeType, content);
        }
        this._uiSourceCode.requestContent(mycallback.bind(this));
    }
1057325
public void init( String baseUrl, XRPCBatchRequestSender callback )
	{
		this.url = baseUrl + "&locale=" + LocaleInfo.getCurrentLocale().getLocaleName();
		this.callback = callback;
	}
1158544
def on_change(self, *callbacks):
        ''' 

        '''
        for callback in callbacks:

            if callback in self._callbacks: continue

            _check_callback(callback, ('event',))

            self._callbacks[callback] = callback
946919
function(element,eventName,callback){
			// Prepare
			var uid = history.Adapter.uid(element);

			// Apply Listener
			history.Adapter.handlers[uid] = history.Adapter.handlers[uid] || {};
			history.Adapter.handlers[uid][eventName] = history.Adapter.handlers[uid][eventName] || [];
			history.Adapter.handlers[uid][eventName].push(callback);

			// Bind Global Listener
			element['on'+eventName] = (function(element,eventName){
				return function(event){
					history.Adapter.trigger(element,eventName,event);
				};
			})(element,eventName);
		}
1251619
function onTokenWillRefresh(callback) {
    // methods are registered globally for the popup to call on this main window
    window.onAuthCompleted = function() {
      // the platform SDK instance from the popup has
      // received a new auth token and saved it to the store.
      // Let's retrieve it for this instance.
      platform.refreshAuthFromStore();
      callback();
    };
    window.onAuthError = function() {
      elmBody.innerHTML = compiledError();
    };

    openPopup();
  }
1161555
function () {
            var url = this.getUrl();
            var pageId = this._cache[url] ? this._cache[url].id : null;
            if (pageId) {
                if (this._navigate) {
                    this.$callback(this._navigate, {
                        pageId : pageId,
                        url : url
                    });
                }
            } else {
                this._addInCache(url, this._lastPageId);
            }
        }
1065787
function(error, callback) {
      if (!this.serverURL) {
        return false;
      }

      var xhr = new XMLHttpRequest();
      xhr.open('POST', this.serverURL, true);
      xhr.onreadystatechange = function() {
        if (xhr.readyState === 4) {
          typeof callback === 'function' && callback(error, xhr.status === 200);
        }
      };

      xhr.setRequestHeader('Content-Type', 'application/json');
      xhr.send(JSON.stringify(error));
    }
914957
def register_updates(self, callback):
        """"""
        _LOGGER.debug("Registered callback for state: %s", self._stateName)
        self._observer_callbacks.append(callback)
923371
public void bind(String url, Functions.Func callback) {
        cropper.croppie("bind", url).then((result, object) -> {
            callback.call();
            return true;
        });
    }
352740
function() {
		var c = this._callback;
		var p = this._pointer;
		if (c) {
			this.then(null, null);
			c.apply(p, arguments);
		} else {
			this._now = true;
		}
	}
53457
function callbackOnce(err, arg) {
            var cb = callback;
            callback = null;
            if (cb) { cb(err, arg); }
        }
92103
function (when, methodName, record) {
            var callbacks = registry[when][methodName]
            for (var i = 0, l = callbacks.length; i < l; i++) {
                callbacks[i].call(this, record)
            }
        }