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

Function yieldmo

ads/vendors/yieldmo.js:7–18  ·  view source on GitHub ↗
(global, data)

Source from the content-addressed store, hash-verified

5 * @param {!Object} data
6 */
7export function yieldmo(global, data) {
8 const ymElem = global.document.createElement('div');
9 ymElem.id = 'ym_' + data.ymid;
10 ymElem.className = 'ym';
11 ymElem.dataset['ampEnabled'] = true;
12 global.document.getElementById('c').appendChild(ymElem);
13
14 const swimLane = Math.round((5 * Math.random()) / 3);
15 const ymJs = 'https://static.yieldmo.com/ym.' + swimLane + '.js';
16
17 loadScript(global, ymJs);
18}

Callers

nothing calls this directly

Calls 2

loadScriptFunction · 0.90
getElementByIdMethod · 0.45

Tested by

no test coverage detected