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

Method renderCount

extensions/amp-pinterest/0.1/save-button.js:111–119  ·  view source on GitHub ↗

* Render helper for the optional count bubble * @param {string} count The data-count attribute * @param {string} heightClass The height class to apply for spacing * @return {Element}

(count, heightClass)

Source from the content-addressed store, hash-verified

109 * @return {Element}
110 */
111 renderCount(count, heightClass) {
112 Util.log('&type=pidget&button_count=1');
113 return Util.make(this.element.ownerDocument, {
114 'span': {
115 class: `-amp-pinterest-bubble-${this.count}${heightClass}`,
116 textContent: this.formatPinCount(count),
117 },
118 });
119 }
120
121 /**
122 * Render the follow button

Callers 1

renderTemplateMethod · 0.95

Calls 3

formatPinCountMethod · 0.95
makeMethod · 0.80
logMethod · 0.45

Tested by

no test coverage detected