MCPcopy
hub / github.com/ampproject/amphtml / constructor

Method constructor

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

* @param {!../runtime/deps.DepsDef} deps * @param {string} src * @param {?Object =} args

(deps, src, args)

Source from the content-addressed store, hash-verified

11914 * @param {?Object<string, ?>=} args
11915 */
11916 constructor(deps, src, args) {
11917 /** @private @const {!../model/doc.Doc} */
11918 this.doc_ = deps.doc();
11919
11920 /** @private @const {!../components/activities.ActivityPorts} */
11921 this.activityPorts_ = deps.activities();
11922
11923 /** @private @const {string} */
11924 this.src_ = src;
11925
11926 /** @private {?Object<string, ?>} */
11927 this.args_ = args || {};
11928
11929 /** @private {?Promise} */
11930 this.animating_ = null;
11931
11932 /** @private @const {!HTMLIFrameElement} */
11933 this.iframe_ = /** @type {!HTMLIFrameElement} */ (
11934 createElement(this.doc_.getWin().document, 'iframe', iframeAttributes)
11935 );
11936
11937 setImportantStyles$1(this.iframe_, toastImportantStyles);
11938
11939 /** @private @const {!Promise} */
11940 this.ready_ = new Promise((resolve) => {
11941 this.iframe_.onload = resolve;
11942 });
11943 }
11944
11945 /**
11946 * Returns the iframe element.

Callers

nothing calls this directly

Calls 5

setImportantStyles$1Function · 0.85
docMethod · 0.80
activitiesMethod · 0.80
createElementFunction · 0.70
getWinMethod · 0.45

Tested by

no test coverage detected