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

Function getPostContainer

3p/facebook.js:62–68  ·  view source on GitHub ↗

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

(global, data)

Source from the content-addressed store, hash-verified

60 * @return {!Element} div
61 */
62function getPostContainer(global, data) {
63 if (data.alignCenter) {
64 const c = global.document.getElementById('c');
65 setStyle(c, 'text-align', 'center');
66 }
67 return createContainer(global, 'post', data.href);
68}
69
70/**
71 * Create DOM element for the Facebook embedded content plugin for videos.

Callers 1

getEmbedContainerFunction · 0.70

Calls 3

setStyleFunction · 0.90
createContainerFunction · 0.70
getElementByIdMethod · 0.45

Tested by

no test coverage detected