MCPcopy Index your code
hub / github.com/ampproject/amphtml / getDefaultBootstrapBaseUrl

Function getDefaultBootstrapBaseUrl

src/3p-frame.js:251–266  ·  view source on GitHub ↗
(parentWindow, opt_srcFileBasename)

Source from the content-addressed store, hash-verified

249 * @return {string}
250 */
251export 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

Callers 7

test-3p-frame.jsFile · 0.90
ProxyIframeEmbedWithRefFunction · 0.90
initiateAdRequestMethod · 0.90
renderMethod · 0.90
getPreconnectUrlsMethod · 0.90
getBootstrapBaseUrlFunction · 0.85

Calls 2

getSubDomainFunction · 0.85

Tested by

no test coverage detected