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

Function createContainer

3p/facebook.js:48–53  ·  view source on GitHub ↗

* Create DOM element for all Facebook embeds. * @param {!Window} global * @param {string} classNameSuffix The suffix for the `fb-` class. * @param {string} href * @return {!Element} div

(global, classNameSuffix, href)

Source from the content-addressed store, hash-verified

46 * @return {!Element} div
47 */
48function createContainer(global, classNameSuffix, href) {
49 const container = global.document.createElement('div');
50 container.className = 'fb-' + classNameSuffix;
51 container.setAttribute('data-href', href);
52 return container;
53}
54
55/**
56 * Create DOM element for the Facebook embedded content plugin for posts.

Callers 5

getPostContainerFunction · 0.70
getVideoContainerFunction · 0.70
getPageContainerFunction · 0.70
getCommentsContainerFunction · 0.70
getLikeContainerFunction · 0.70

Calls 1

setAttributeMethod · 0.45

Tested by

no test coverage detected