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

Method constructor

src/utils/dom-writer.js:65–96  ·  view source on GitHub ↗

* @param {!Window} win

(win)

Source from the content-addressed store, hash-verified

63 * @param {!Window} win
64 */
65 constructor(win) {
66 /** @const @private {!Document} */
67 this.parser_ = win.document.implementation.createHTMLDocument('');
68 this.parser_.open();
69
70 /** @const @private */
71 this.vsync_ = Services.vsyncFor(win);
72
73 /** @private @const */
74 this.boundMerge_ = this.merge_.bind(this);
75
76 /** @private {?function(!Document):!Element} */
77 this.onBody_ = null;
78
79 /** @private {?function()} */
80 this.onBodyChunk_ = null;
81
82 /** @private {?function()} */
83 this.onEnd_ = null;
84
85 /** @private {boolean} */
86 this.mergeScheduled_ = false;
87
88 /** @const @private {!Promise} */
89 this.success_ = Promise.resolve();
90
91 /** @private {boolean} */
92 this.eof_ = false;
93
94 /** @private {?Element} */
95 this.targetBody_ = null;
96 }
97
98 /** @override */
99 onBody(callback) {

Callers

nothing calls this directly

Calls 2

resolveMethod · 0.80
openMethod · 0.45

Tested by

no test coverage detected