* @param {!Window} win * @param {!../components/activities.ActivityPorts} activityPorts * @param {string} src * @param {!Object =} args Additional data to be passed to the iframe. * @param {boolean=} shouldFadeBody * @param {boolean=} hasLoadingIndicator
(
win,
activityPorts,
src,
args,
shouldFadeBody = false,
hasLoadingIndicator = false
)
| 3871 | * @param {boolean=} hasLoadingIndicator |
| 3872 | */ |
| 3873 | constructor( |
| 3874 | win, |
| 3875 | activityPorts, |
| 3876 | src, |
| 3877 | args, |
| 3878 | shouldFadeBody = false, |
| 3879 | hasLoadingIndicator = false |
| 3880 | ) { |
| 3881 | super(); |
| 3882 | |
| 3883 | /** @private @const {!Window} */ |
| 3884 | this.win_ = win; |
| 3885 | |
| 3886 | /** @private @const {!Document} */ |
| 3887 | this.doc_ = this.win_.document; |
| 3888 | |
| 3889 | /** @private @const {!HTMLIFrameElement} */ |
| 3890 | this.iframe_ = /** @type {!HTMLIFrameElement} */ ( |
| 3891 | createElement(this.doc_, 'iframe', iframeAttributes$2) |
| 3892 | ); |
| 3893 | |
| 3894 | /** @private @const {!../components/activities.ActivityPorts} */ |
| 3895 | this.activityPorts_ = activityPorts; |
| 3896 | |
| 3897 | /** @private @const {string} */ |
| 3898 | this.src_ = src; |
| 3899 | |
| 3900 | /** @private @const {!Object<string, ?>} */ |
| 3901 | this.args_ = args || {}; |
| 3902 | |
| 3903 | /** @private @const {boolean} */ |
| 3904 | this.shouldFadeBody_ = shouldFadeBody; |
| 3905 | |
| 3906 | /** @private @const {boolean} */ |
| 3907 | this.hasLoadingIndicator_ = hasLoadingIndicator; |
| 3908 | |
| 3909 | /** @private {?../components/activities.ActivityIframePort} */ |
| 3910 | this.port_ = null; |
| 3911 | |
| 3912 | /** |
| 3913 | * @private |
| 3914 | * {?function<!web-activities/activity-ports.ActivityIframePort|!Promise>} |
| 3915 | */ |
| 3916 | this.portResolver_ = null; |
| 3917 | |
| 3918 | /** |
| 3919 | * @private @const |
| 3920 | * {!Promise<!web-activities/activity-ports.ActivityIframePort>} |
| 3921 | */ |
| 3922 | this.portPromise_ = new Promise((resolve) => { |
| 3923 | this.portResolver_ = resolve; |
| 3924 | }); |
| 3925 | } |
| 3926 | |
| 3927 | /** @override */ |
| 3928 | getElement() { |
nothing calls this directly
no test coverage detected