onStartup = function (callback) {
  // Fix for < IE9, see http://javascript.nwbox.com/IEContentLoaded/
  var doScroll = !document.addEventListener &&
    document.documentElement.doScroll;

  if (!doScroll || window !== top) {
    if (isReady)
      callback();
    else
      callbackQueue.push(callback);
  } else {
    try { doScroll('left'); }
    catch (error) {
      setTimeout(function () { onStartup(callback); }, 50);
      return;
    };
    callback();
  }
}
@summary Run code when a client or a server starts.
@locus Anywhere
@param {Function} func A function to run on startup.