analytics.js
function onError (fn) {
  callbacks.push(fn);
  if (window.onerror != handler) {
    callbacks.push(window.onerror);
    window.onerror = handler;
  }
}
function onError (fn) {
  callbacks.push(fn);
  if (window.onerror != handler) {
    callbacks.push(window.onerror);
    window.onerror = handler;
  }
}
function onError ( fn ) { callbacks . push ( fn ) ; if ( window . onerror != handler ) { callbacks . push ( window . onerror ) ; window . onerror = handler ; } }
Call a `fn` on `window.onerror`.

@param {Function} fn
Call a fn on window . onerror .