* Returns the promise that will be resolved when the extension has been * loaded. If necessary, adds the extension script to the page. * @param {string} extensionId * @param {string=} version * @return {!Promise<!ExtensionDef>}
(extensionId, version = DEFAULT_VERSION)
| 212 | * @return {!Promise<!ExtensionDef>} |
| 213 | */ |
| 214 | preloadExtension(extensionId, version = DEFAULT_VERSION) { |
| 215 | if (extensionId == 'amp-embed') { |
| 216 | extensionId = 'amp-ad'; |
| 217 | } |
| 218 | const holder = this.getExtensionHolder_(extensionId, version); |
| 219 | this.insertExtensionScriptIfNeeded_(extensionId, version, holder); |
| 220 | return this.waitFor_(holder); |
| 221 | } |
| 222 | |
| 223 | /** |
| 224 | * Returns the promise that will be resolved when the extension has been |
no test coverage detected