MCPcopy Index your code
hub / github.com/ampproject/amphtml / getPostContainer

Function getPostContainer

3p/reddit.js:17–22  ·  view source on GitHub ↗

* Embedly looks for a blockquote with a '-card' suffixed class. * @param {!Window} global * @return {!Element} blockquote

(global)

Source from the content-addressed store, hash-verified

15 * @return {!Element} blockquote
16 */
17function getPostContainer(global) {
18 const blockquote = global.document.createElement('blockquote');
19 blockquote.classList.add('reddit-card');
20 blockquote.setAttribute('data-card-created', Math.floor(Date.now() / 1000));
21 return blockquote;
22}
23
24/**
25 * @param {!Window} global

Callers 1

redditFunction · 0.70

Calls 3

nowMethod · 0.80
addMethod · 0.45
setAttributeMethod · 0.45

Tested by

no test coverage detected