function createBrowserApi() {
  if (location.origin === 'chrome://print') {
    return createBrowserApiForPrintPreview();
  }

  return createBrowserApiForMimeHandlerView();
}
/**
 * @return {Promise<BrowserApi>} A promise to a BrowserApi instance for the
 *     current environment.
 */
@return {Promise} A promise to a BrowserApi instance for the
current environment.
@return { Promise } A promise to a BrowserApi instance for the current environment .
function createBrowserApi() {
  if (location.origin === 'chrome://print') {
    return createBrowserApiForPrintPreview();
  }
  return createBrowserApiForMimeHandlerView();
}
function createBrowserApi ( ) { if ( location . origin === 'chrome://print' ) { return createBrowserApiForPrintPreview ( ) ; } return createBrowserApiForMimeHandlerView ( ) ; }
@return {Promise<BrowserApi>} A promise to a BrowserApi instance for the
     current environment.
@return { Promise<BrowserApi > } A promise to a BrowserApi instance for the current environment .