* @param {!Window} win * @param {!IframeMessagingClient} iframeMessagingClient * @param {string} creativeId The ID of the creative that the event * pertains to. * @param {string} vendor The 3p vendor name
(win, iframeMessagingClient, creativeId, vendor)
| 122 | * @param {string} vendor The 3p vendor name |
| 123 | */ |
| 124 | constructor(win, iframeMessagingClient, creativeId, vendor) { |
| 125 | /** @private {!IframeMessagingClient} */ |
| 126 | this.iframeMessagingClient_ = iframeMessagingClient; |
| 127 | |
| 128 | /** @private @const {!Object} */ |
| 129 | this.baseMessage_ = {creativeId, vendor}; |
| 130 | |
| 131 | /** @private {?function(string)} */ |
| 132 | this.listener_ = null; |
| 133 | |
| 134 | userAssert( |
| 135 | win['onNewContextInstance'] && |
| 136 | typeof win['onNewContextInstance'] == 'function', |
| 137 | 'Must implement onNewContextInstance in ' + win.location.href |
| 138 | ); |
| 139 | win['onNewContextInstance'](this); |
| 140 | } |
| 141 | |
| 142 | /** |
| 143 | * Registers a callback function to be called when an AMP analytics event |
nothing calls this directly
no test coverage detected