(parentWindow, opt_srcFileBasename)
| 249 | * @return {string} |
| 250 | */ |
| 251 | export function getDefaultBootstrapBaseUrl(parentWindow, opt_srcFileBasename) { |
| 252 | const srcFileBasename = opt_srcFileBasename || 'frame'; |
| 253 | if (!mode.isProd()) { |
| 254 | return getDevelopmentBootstrapBaseUrl(parentWindow, srcFileBasename); |
| 255 | } |
| 256 | // Ensure same sub-domain is used despite potentially different file. |
| 257 | parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN = |
| 258 | parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN || |
| 259 | getSubDomain(parentWindow); |
| 260 | return ( |
| 261 | 'https://' + |
| 262 | parentWindow.__AMP_DEFAULT_BOOTSTRAP_SUBDOMAIN + |
| 263 | `.${urls.thirdPartyFrameHost}/${mode.version()}/` + |
| 264 | `${srcFileBasename}.html` |
| 265 | ); |
| 266 | } |
| 267 | |
| 268 | /** |
| 269 | * Function to return the development bootstrap base URL |
no test coverage detected