function waitForAppUpgrade() {
  if (!upgradePromise) {
    upgradePromise = new Promise(function(resolve, reject) {
      if (window.Polymer && Polymer.isInstance &&
          Polymer.isInstance($('history-app'))) {
        resolve();
      } else {
        $('bundle').addEventListener('load', resolve);
      }
    });
  }
  return upgradePromise;
}
/**
 * @return {!Promise} Resolves once the history-app has been fully upgraded.
 */
@return {!Promise} Resolves once the history-app has been fully upgraded.
@return { !Promise } Resolves once the history - app has been fully upgraded .
function waitForAppUpgrade() {
  if (!upgradePromise) {
    upgradePromise = new Promise(function(resolve, reject) {
      if (window.Polymer && Polymer.isInstance &&
          Polymer.isInstance($('history-app'))) {
        resolve();
      } else {
        $('bundle').addEventListener('load', resolve);
      }
    });
  }
  return upgradePromise;
}
function waitForAppUpgrade ( ) { if ( ! upgradePromise ) { upgradePromise = new Promise ( function ( resolve , reject ) { if ( window . Polymer && Polymer . isInstance && Polymer . isInstance ( $ ( 'history-app' ) ) ) { resolve ( ) ; } else { $ ( 'bundle' ) . addEventListener ( 'load' , resolve ) ; } } ) ; } return upgradePromise ; }
@return {!Promise} Resolves once the history-app has been fully upgraded.
@return { !Promise } Resolves once the history - app has been fully upgraded .