* @param {!Window} global * @param {!Object} data * @param {string} publisherUrl
(global, data, publisherUrl)
| 109 | * @param {string} publisherUrl |
| 110 | */ |
| 111 | function loadRecTag(global, data, publisherUrl) { |
| 112 | let url = getURL(data); |
| 113 | url += '&adInstanceId=' + data['adinstanceid']; |
| 114 | global['amzn_assoc_URL'] = publisherUrl; |
| 115 | |
| 116 | if (data['recomtype'] === 'sync') { |
| 117 | writeScript(global, url); |
| 118 | } else if (data['recomtype'] === 'async') { |
| 119 | const d = global.document.createElement('div'); |
| 120 | d.setAttribute('id', data['divid']); |
| 121 | global.document.getElementById('c').appendChild(d); |
| 122 | loadScript(global, url); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | /** |
| 127 | * @param {!Window} global |
no test coverage detected