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

Method constructor

third_party/subscriptions-project/swg.js:18356–18373  ·  view source on GitHub ↗

* Page configuration is known when Propensity API * is available, publication ID is therefore used * in constructor for the server interface. * @param {!Window} win * @param {!./deps.DepsDef} deps * @param {!./fetcher.Fetcher} fetcher

(win, deps, fetcher)

Source from the content-addressed store, hash-verified

18354 * @param {!./fetcher.Fetcher} fetcher
18355 */
18356 constructor(win, deps, fetcher) {
18357 /** @private @const {!Window} */
18358 this.win_ = win;
18359 /** @private @const {!./deps.DepsDef} */
18360 this.deps_ = deps;
18361 /** @private @const {string} */
18362 this.publicationId_ = this.deps_.pageConfig().getPublicationId();
18363 /** @private {?string} */
18364 this.clientId_ = null;
18365 /** @private @const {!./fetcher.Fetcher} */
18366 this.fetcher_ = fetcher;
18367 /** @private @const {number} */
18368 this.version_ = 1;
18369
18370 this.deps_
18371 .eventManager()
18372 .registerEventListener(this.handleClientEvent_.bind(this));
18373 }
18374
18375 /**
18376 * @private

Callers

nothing calls this directly

Calls 4

getPublicationIdMethod · 0.80
pageConfigMethod · 0.80
eventManagerMethod · 0.80
registerEventListenerMethod · 0.45

Tested by

no test coverage detected