loadExtensionURL (extensionURL) {
        if (builtinExtensions.hasOwnProperty(extensionURL)) {
            /** @TODO dupe handling for non-builtin extensions. See commit 670e51d33580e8a2e852b3b038bb3afc282f81b9 */
            if (this.isExtensionLoaded(extensionURL)) {
                const message = `Rejecting attempt to load a second extension with ID ${extensionURL}`;
                log.warn(message);
                return Promise.reject(new Error(message));
            }

            const extension = builtinExtensions[extensionURL];
            const extensionInstance = new extension(this.runtime);
            return this._registerInternalExtension(extensionInstance).then(() => {
                this._loadedExtensions.add(extensionURL);
            });
        }

        return new Promise((resolve, reject) => {
            // If we `require` this at the global level it breaks non-webpack targets, including tests
            const ExtensionWorker = require('worker-loader?name=extension-worker.js!./extension-worker');

            this.pendingExtensions.push({extensionURL, resolve, reject});
            dispatch.addWorker(new ExtensionWorker());
        });
    }
/**
     * Load an extension by URL or internal extension ID
     * @param {string} extensionURL - the URL for the extension to load OR the ID of an internal extension
     * @returns {Promise} resolved once the extension is loaded and initialized or rejected on failure
     */
Load an extension by URL or internal extension ID
@param {string} extensionURL - the URL for the extension to load OR the ID of an internal extension
@returns {Promise} resolved once the extension is loaded and initialized or rejected on failure
Load an extension by URL or internal extension ID @param { string } extensionURL - the URL for the extension to load OR the ID of an internal extension @returns { Promise } resolved once the extension is loaded and initialized or rejected on failure
loadExtensionURL (extensionURL) {
        if (builtinExtensions.hasOwnProperty(extensionURL)) {
            if (this.isExtensionLoaded(extensionURL)) {
                const message = `Rejecting attempt to load a second extension with ID ${extensionURL}`;
                log.warn(message);
                return Promise.reject(new Error(message));
            }
            const extension = builtinExtensions[extensionURL];
            const extensionInstance = new extension(this.runtime);
            return this._registerInternalExtension(extensionInstance).then(() => {
                this._loadedExtensions.add(extensionURL);
            });
        }
        return new Promise((resolve, reject) => {
            const ExtensionWorker = require('worker-loader?name=extension-worker.js!./extension-worker');
            this.pendingExtensions.push({extensionURL, resolve, reject});
            dispatch.addWorker(new ExtensionWorker());
        });
    }
loadExtensionURL ( extensionURL ) { if ( builtinExtensions . hasOwnProperty ( extensionURL ) ) { if ( this . isExtensionLoaded ( extensionURL ) ) { const message = ` ${ extensionURL } ` ; log . warn ( message ) ; return Promise . reject ( new Error ( message ) ) ; } const extension = builtinExtensions [ extensionURL ] ; const extensionInstance = new extension ( this . runtime ) ; return this . _registerInternalExtension ( extensionInstance ) . then ( ( ) => { this . _loadedExtensions . add ( extensionURL ) ; } ) ; } return new Promise ( ( resolve , reject ) => { const ExtensionWorker = require ( 'worker-loader?name=extension-worker.js!./extension-worker' ) ; this . pendingExtensions . push ( { extensionURL , resolve , reject } ) ; dispatch . addWorker ( new ExtensionWorker ( ) ) ; } ) ; }
Load an extension by URL or internal extension ID
 @param {string} extensionURL - the URL for the extension to load OR the ID of an internal extension
 @returns {Promise} resolved once the extension is loaded and initialized or rejected on failure
Load an extension by URL or internal extension ID @param { string } extensionURL - the URL for the extension to load OR the ID of an internal extension @returns { Promise } resolved once the extension is loaded and initialized or rejected on failure
/** @TODO dupe handling for non-builtin extensions. See commit 670e51d33580e8a2e852b3b038bb3afc282f81b9 */ // If we `require` this at the global level it breaks non-webpack targets, including tests