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

Method constructor

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

* @param {!./deps.DepsDef} deps * @param {!../api/subscriptions.OffersRequest=} options

(deps, options = {})

Source from the content-addressed store, hash-verified

6653 * @param {!../api/subscriptions.OffersRequest=} options
6654 */
6655 constructor(deps, options = {}) {
6656 /** @private @const {!./deps.DepsDef} */
6657 this.deps_ = deps;
6658
6659 /** @private @const {!../api/subscriptions.OffersRequest|undefined} */
6660 this.options_ = options;
6661
6662 /** @private @const {!Window} */
6663 this.win_ = deps.win();
6664
6665 /** @private @const {!../components/activities.ActivityPorts} */
6666 this.activityPorts_ = deps.activities();
6667
6668 /** @private @const {!../components/dialog-manager.DialogManager} */
6669 this.dialogManager_ = deps.dialogManager();
6670
6671 /** @private @const {!../runtime/client-event-manager.ClientEventManager} */
6672 this.eventManager_ = deps.eventManager();
6673
6674 /** @private @const {!ActivityIframeView} */
6675 this.activityIframeView_ = new ActivityIframeView(
6676 this.win_,
6677 this.activityPorts_,
6678 feUrl('/abbrvofferiframe'),
6679 feArgs({
6680 'publicationId': deps.pageConfig().getPublicationId(),
6681 'productId': deps.pageConfig().getProductId(),
6682 'showNative': deps.callbacks().hasSubscribeRequestCallback(),
6683 'list': (options && options.list) || 'default',
6684 'skus': (options && options.skus) || null,
6685 'isClosable': true,
6686 }),
6687 /* shouldFadeBody */ false
6688 );
6689 }
6690
6691 /**
6692 * @param {AlreadySubscribedResponse} response

Callers

nothing calls this directly

Calls 11

feUrlFunction · 0.85
feArgsFunction · 0.85
activitiesMethod · 0.80
dialogManagerMethod · 0.80
eventManagerMethod · 0.80
getPublicationIdMethod · 0.80
pageConfigMethod · 0.80
getProductIdMethod · 0.80
callbacksMethod · 0.80
winMethod · 0.45

Tested by

no test coverage detected