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

Method constructor

src/polyfills/custom-elements.js:184–217  ·  view source on GitHub ↗

* @param {!Window} win

(win)

Source from the content-addressed store, hash-verified

182 * @param {!Window} win
183 */
184 constructor(win) {
185 /** @private @const */
186 this.win_ = win;
187
188 /** @private @const @type {!{[key: string]: !CustomElementDef}} */
189 this.definitions_ = map();
190
191 /**
192 * A up-to-date DOM selector for all custom elements.
193 * @type {string}
194 */
195 this.query_ = '';
196
197 /**
198 * The currently upgrading element.
199 * @private {?Element}
200 */
201 this.current_ = null;
202
203 /**
204 * Once started (after the first Custom Element definition), this tracks
205 * DOM append and removals.
206 *
207 * @private {?MutationObserver}
208 */
209 this.mutationObserver_ = null;
210
211 /**
212 * All the observed DOM trees, including shadow trees.
213 *
214 * @private @const {!Array<!Node>}
215 */
216 this.roots_ = [win.document];
217 }
218
219 /**
220 * The currently-being-upgraded custom element.

Callers

nothing calls this directly

Calls 1

mapFunction · 0.90

Tested by

no test coverage detected