MCPcopy
hub / github.com/ampproject/amphtml / getCommentsContainer

Function getCommentsContainer

3p/facebook.js:132–139  ·  view source on GitHub ↗

* Create DOM element for the Facebook comments plugin: * Reference: https://developers.facebook.com/docs/plugins/comments * @param {!Window} global * @param {!Object} data The element data * @return {!Element} div

(global, data)

Source from the content-addressed store, hash-verified

130 * @return {!Element} div
131 */
132function getCommentsContainer(global, data) {
133 const container = createContainer(global, 'comments', data.href);
134 container.setAttribute('data-numposts', data.numposts || 10);
135 container.setAttribute('data-colorscheme', data.colorscheme || 'light');
136 container.setAttribute('data-order-by', data.orderBy || 'social');
137 container.setAttribute('data-width', '100%');
138 return container;
139}
140
141/**
142 * Create DOM element for the Facebook like-button plugin:

Callers 1

getEmbedContainerFunction · 0.85

Calls 2

createContainerFunction · 0.70
setAttributeMethod · 0.45

Tested by

no test coverage detected