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

Method constructor

3p/ampcontext.js:18–119  ·  view source on GitHub ↗

* @param {!Window} win The window that the instance is built inside.

(win)

Source from the content-addressed store, hash-verified

16 * @param {!Window} win The window that the instance is built inside.
17 */
18 constructor(win) {
19 devAssert(
20 !this.isAbstractImplementation_(),
21 'Should not construct AbstractAmpContext instances directly'
22 );
23
24 /** @protected {!Window} */
25 this.win_ = win;
26
27 // This value is cached since it could be overwritten by the master frame
28 // check using a value of a different type.
29 /** @private {?string} */
30 this.cachedFrameName_ = this.win_.name || null;
31
32 /** @protected {?string} */
33 this.embedType_ = null;
34
35 // ----------------------------------------------------
36 // Please keep public attributes alphabetically sorted.
37 // ----------------------------------------------------
38
39 /** @public {?string|undefined} */
40 this.canary = null;
41
42 /** @type {?string} */
43 this.canonicalUrl = null;
44
45 /** @type {?string} */
46 this.clientId = null;
47
48 /** @type {?string|undefined} */
49 this.container = null;
50
51 /** @type {?Object} */
52 this.consentSharedData = null;
53
54 /** @type {?{[key: string]: *}} */
55 this.data = null;
56
57 /** @type {?string} */
58 this.domFingerprint = null;
59
60 /** @type {?boolean} */
61 this.hidden = null;
62
63 /** @type {?number} */
64 this.initialConsentState = null;
65
66 /** @type {?string} */
67 this.initialConsentValue = null;
68
69 /** @type {?Object} */
70 this.initialConsentMetadata = null;
71
72 /** @type {?Object} */
73 this.initialLayoutRect = null;
74
75 /** @type {?Object} */

Callers

nothing calls this directly

Calls 8

findAndSetMetadata_Method · 0.95
getHostWindow_Method · 0.95
devAssertFunction · 0.90
mapFunction · 0.90
setSentinelMethod · 0.80

Tested by

no test coverage detected