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

Method setupMetadataFromContext_

3p/ampcontext.js:359–381  ·  view source on GitHub ↗

* Set the metadata attributes from the "context" instance directly. * @param {!Object} context * @private

(context)

Source from the content-addressed store, hash-verified

357 * @private
358 */
359 setupMetadataFromContext_(context) {
360 this.canary = context.canary;
361 this.canonicalUrl = context.canonicalUrl;
362 this.clientId = context.clientId;
363 this.consentSharedData = context.consentSharedData;
364 this.container = context.container;
365 this.domFingerprint = context.domFingerprint;
366 this.hidden = context.hidden;
367 this.initialConsentState = context.initialConsentState;
368 this.initialConsentValue = context.initialConsentValue;
369 this.initialConsentMetadata = context.initialConsentMetadata;
370 this.initialLayoutRect = context.initialLayoutRect;
371 this.initialIntersection = context.initialIntersection;
372 this.location = parseUrlDeprecated(context.location.href);
373 this.mode = context.mode;
374 this.pageViewId = context.pageViewId;
375 this.pageViewId64 = context.pageViewId64;
376 this.referrer = context.referrer;
377 this.sentinel = context.sentinel;
378 this.sourceUrl = context.sourceUrl;
379 this.startTime = context.startTime;
380 this.tagName = context.tagName;
381 }
382
383 /**
384 * Calculate the hostWindow

Callers 2

setupMetadata_Method · 0.95
findAndSetMetadata_Method · 0.95

Calls 1

parseUrlDeprecatedFunction · 0.90

Tested by

no test coverage detected