* Wraps a buildDom function with functionality that every component needs.
(buildDom: BuildDom)
| 22 | * Wraps a buildDom function with functionality that every component needs. |
| 23 | */ |
| 24 | function wrap(buildDom: BuildDom): BuildDom { |
| 25 | return function wrapper(element) { |
| 26 | applyStaticLayout(element as AmpElement); |
| 27 | buildDom(element); |
| 28 | element.setAttribute('i-amphtml-ssr', ''); |
| 29 | element.classList.add('i-amphtml-element'); |
| 30 | }; |
| 31 | } |
| 32 | |
| 33 | /** |
| 34 | * Returns the set of component builders needed to server-render an AMP Document. |
no test coverage detected