* @param {!Window} global * @param {!Object} data * @return {?Node}
(global, data)
| 77 | * @return {?Node} |
| 78 | */ |
| 79 | function getInitAdScript(global, data) { |
| 80 | const scriptElement = global.document.createElement('script'); |
| 81 | const initData = getInitData(data); |
| 82 | const initScript = global.document.createTextNode( |
| 83 | `NativeAd(${JSON.stringify(initData)});` |
| 84 | ); |
| 85 | |
| 86 | scriptElement.appendChild(initScript); |
| 87 | |
| 88 | return scriptElement; |
| 89 | } |
no test coverage detected