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

Method constructor

src/service/fixed-layer.js:60–99  ·  view source on GitHub ↗

* @param {!./ampdoc-impl.AmpDoc} ampdoc * @param {!./vsync-impl.Vsync} vsync * @param {number} borderTop * @param {number} paddingTop * @param {boolean} transfer

(ampdoc, vsync, borderTop, paddingTop, transfer)

Source from the content-addressed store, hash-verified

58 * @param {boolean} transfer
59 */
60 constructor(ampdoc, vsync, borderTop, paddingTop, transfer) {
61 /** @const {!./ampdoc-impl.AmpDoc} */
62 this.ampdoc = ampdoc;
63
64 /** @private @const */
65 this.vsync_ = vsync;
66
67 /** @const @private {number} */
68 this.borderTop_ = borderTop;
69
70 /** @private {number} */
71 this.paddingTop_ = paddingTop;
72
73 /** @private {number} */
74 this.committedPaddingTop_ = paddingTop;
75
76 /** @private @const {boolean} */
77 this.transfer_ = transfer && ampdoc.isSingleDoc();
78
79 /** @private {?TransferLayerDef} */
80 this.transferLayer_ = null;
81
82 /** @private {number} */
83 this.counter_ = 0;
84
85 /** @const @private {!Array<!ElementDef>} */
86 this.elements_ = [];
87
88 /** @const @private {!Pass} */
89 this.updatePass_ = new Pass(ampdoc.win, () => this.update());
90
91 /** @private {?function()} */
92 this.hiddenObserverUnlistener_ = null;
93
94 /** @private {!Array<string>} */
95 this.fixedSelectors_ = [];
96
97 /** @private {!Array<string>} */
98 this.stickySelectors_ = [];
99 }
100
101 /**
102 * Informs FixedLayer that a lightbox was opened.

Callers

nothing calls this directly

Calls 2

updateMethod · 0.95
isSingleDocMethod · 0.45

Tested by

no test coverage detected