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

Method constructor

src/base-template.js:16–27  ·  view source on GitHub ↗

* @param {!Element} element * @param {!Window} win

(element, win)

Source from the content-addressed store, hash-verified

14 * @param {!Window} win
15 */
16 constructor(element, win) {
17 /** @public @const */
18 this.element = element;
19
20 /** @public @const {!Window} */
21 this.win = element.ownerDocument.defaultView || win;
22
23 /** @private @const */
24 this.viewer_ = Services.viewerForDoc(this.element);
25
26 this.compileCallback();
27 }
28
29 /**
30 * Override in subclass if the element needs to compile the template.

Callers

nothing calls this directly

Calls 1

compileCallbackMethod · 0.95

Tested by

no test coverage detected