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

Function getBottomLineContainer

3p/yotpo.js:33–48  ·  view source on GitHub ↗

* Create DOM element for the Yotpo bottom line plugin: * @param {!Window} global * @param {!Object} data The element data * @return {!Element} div

(global, data)

Source from the content-addressed store, hash-verified

31 * @return {!Element} div
32 */
33function getBottomLineContainer(global, data) {
34 const container = global.document.createElement('div');
35 container.className = 'preview-only-full-height';
36
37 const childDiv = global.document.createElement('div');
38 childDiv.className = 'preview-only-flex-center preview-only-full-height';
39 container.appendChild(childDiv);
40
41 const bottomLine = global.document.createElement('div');
42 bottomLine.className = 'yotpo bottomLine';
43 bottomLine.setAttribute('data-product-id', data.productId);
44
45 childDiv.appendChild(bottomLine);
46
47 return container;
48}
49
50/**
51 * Create DOM element for the Yotpo main widget plugin:

Callers 1

yotpoFunction · 0.85

Calls 1

setAttributeMethod · 0.45

Tested by

no test coverage detected