function initializeGlobalVariable(browserExtension) {
  /** @type {BlazorBrowserExtension} */
  let blazorBrowserExtension;

  // initialize global property BlazorBrowserExtension
  if (!globalThis.hasOwnProperty("BlazorBrowserExtension")) {
    blazorBrowserExtension = new BlazorBrowserExtension();
    blazorBrowserExtension.Modes = BrowserExtensionModes;
    globalThis.BlazorBrowserExtension = blazorBrowserExtension;
  } else {
    blazorBrowserExtension = /** @type {BlazorBrowserExtension} */(globalThis.BlazorBrowserExtension);
  }

  if (blazorBrowserExtension.BrowserExtension) {
    // Extensions execution should be isolated so this property should be null upon initialization.
    throw new Error("Browser extension cannot be loaded.");
  }

  blazorBrowserExtension.BrowserExtension = browserExtension;

  return blazorBrowserExtension;
}
/**
 * Initializes the Blazor Browser Extension global variable
 * @param {BrowserExtension} browserExtension The browser extension.
 * @returns {BlazorBrowserExtension}
 */
Initializes the Blazor Browser Extension global variable
@param {BrowserExtension} browserExtension The browser extension.
Initializes the Blazor Browser Extension global variable @param { BrowserExtension } browserExtension The browser extension .
function initializeGlobalVariable(browserExtension) {
  let blazorBrowserExtension;
  if (!globalThis.hasOwnProperty("BlazorBrowserExtension")) {
    blazorBrowserExtension = new BlazorBrowserExtension();
    blazorBrowserExtension.Modes = BrowserExtensionModes;
    globalThis.BlazorBrowserExtension = blazorBrowserExtension;
  } else {
    blazorBrowserExtension = (globalThis.BlazorBrowserExtension);
  }
  if (blazorBrowserExtension.BrowserExtension) {
    throw new Error("Browser extension cannot be loaded.");
  }
  blazorBrowserExtension.BrowserExtension = browserExtension;
  return blazorBrowserExtension;
}
function initializeGlobalVariable ( browserExtension ) { let blazorBrowserExtension ; if ( ! globalThis . hasOwnProperty ( "BlazorBrowserExtension" ) ) { blazorBrowserExtension = new BlazorBrowserExtension ( ) ; blazorBrowserExtension . Modes = BrowserExtensionModes ; globalThis . BlazorBrowserExtension = blazorBrowserExtension ; } else { blazorBrowserExtension = ( globalThis . BlazorBrowserExtension ) ; } if ( blazorBrowserExtension . BrowserExtension ) { throw new Error ( "Browser extension cannot be loaded." ) ; } blazorBrowserExtension . BrowserExtension = browserExtension ; return blazorBrowserExtension ; }
Initializes the Blazor Browser Extension global variable
 @param {BrowserExtension} browserExtension The browser extension.
Initializes the Blazor Browser Extension global variable @param { BrowserExtension } browserExtension The browser extension .
/** @type {BlazorBrowserExtension} */ // initialize global property BlazorBrowserExtension /** @type {BlazorBrowserExtension} */ // Extensions execution should be isolated so this property should be null upon initialization.