MCPcopy Create free account
hub / github.com/ampproject/amphtml / constructor

Method constructor

src/service/mutator-impl.js:28–50  ·  view source on GitHub ↗

* @param {!./ampdoc-impl.AmpDoc} ampdoc

(ampdoc)

Source from the content-addressed store, hash-verified

26 * @param {!./ampdoc-impl.AmpDoc} ampdoc
27 */
28 constructor(ampdoc) {
29 /** @const {!./ampdoc-impl.AmpDoc} */
30 this.ampdoc = ampdoc;
31
32 /** @const {!Window} */
33 this.win = ampdoc.win;
34
35 /** @private @const {!./resources-interface.ResourcesInterface} */
36 this.resources_ = Services.resourcesForDoc(ampdoc);
37
38 /** @private @const {!./viewport/viewport-interface.ViewportInterface} */
39 this.viewport_ = Services.viewportForDoc(this.ampdoc);
40
41 /** @private @const {!./vsync-impl.Vsync} */
42 this.vsync_ = Services./*OK*/ vsyncFor(this.win);
43
44 /** @private @const {!FocusHistory} */
45 this.activeHistory_ = new FocusHistory(this.win, FOCUS_HISTORY_TIMEOUT_);
46
47 this.activeHistory_.onFocus((element) => {
48 this.checkPendingChangeSize_(element);
49 });
50 }
51
52 /** @override */
53 forceChangeSize(element, newHeight, newWidth, opt_callback, opt_newMargins) {

Callers

nothing calls this directly

Calls 2

onFocusMethod · 0.80

Tested by

no test coverage detected