MCPcopy
hub / github.com/ampproject/amphtml / calculateExtensionFileUrl

Function calculateExtensionFileUrl

src/service/extension-script.js:63–72  ·  view source on GitHub ↗
(
  win,
  location,
  filename,
  opt_isLocalDev
)

Source from the content-addressed store, hash-verified

61 * @return {string}
62 */
63export function calculateExtensionFileUrl(
64 win,
65 location,
66 filename,
67 opt_isLocalDev
68) {
69 const base = calculateScriptBaseUrl(location, opt_isLocalDev);
70 const rtv = getMode(win).rtvVersion;
71 return `${base}/rtv/${rtv}/v0/${filename}`;
72}
73
74/**
75 * Calculate script url for an entry point.

Callers 2

Calls 2

getModeFunction · 0.90
calculateScriptBaseUrlFunction · 0.85

Tested by

no test coverage detected