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

Function setNameframeExperimentConfigs

ads/google/a4a/utils.js:936–945  ·  view source on GitHub ↗
(headers, nameframeConfig)

Source from the content-addressed store, hash-verified

934 * @param {!NameframeExperimentConfig} nameframeConfig
935 */
936export function setNameframeExperimentConfigs(headers, nameframeConfig) {
937 const nameframeExperimentHeader = headers.get('amp-nameframe-exp');
938 if (nameframeExperimentHeader) {
939 nameframeExperimentHeader.split(';').forEach((config) => {
940 if (config == 'instantLoad' || config == 'writeInBody') {
941 nameframeConfig[config] = true;
942 }
943 });
944 }
945}
946
947/**
948 * Enum for browser capabilities. NOTE: Since JS is 32-bit, do not add anymore

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
forEachMethod · 0.45

Tested by

no test coverage detected