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

Method constructor

src/service/hidden-observer-impl.js:27–40  ·  view source on GitHub ↗

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

(ampdoc)

Source from the content-addressed store, hash-verified

25 * @param {!./ampdoc-impl.AmpDoc} ampdoc
26 */
27 constructor(ampdoc) {
28 /** @const {!Document|!ShadowRoot} */
29 this.root_ = ampdoc.getRootNode();
30 const doc = this.root_.ownerDocument || this.root_;
31
32 /** @const {!Window} */
33 this.win_ = /** @type {!Window} */ (devAssert(doc.defaultView));
34
35 /** @private {?MutationObserver} */
36 this.mutationObserver_ = null;
37
38 /** @private {?Observable<!Array<!MutationRecord>>} */
39 this.observable_ = null;
40 }
41
42 /**
43 * Adds the observer to this instance.

Callers

nothing calls this directly

Calls 2

devAssertFunction · 0.90
getRootNodeMethod · 0.45

Tested by

no test coverage detected