* Installs the specified element implementation in the ampdoc. * @param {!./ampdoc-impl.AmpDoc} ampdoc * @param {string} name * @param {typeof ../base-element.BaseElement} implementationClass * @param {?string|undefined} css * @private
(ampdoc, name, implementationClass, css)
| 364 | * @private |
| 365 | */ |
| 366 | installElement_(ampdoc, name, implementationClass, css) { |
| 367 | if (css) { |
| 368 | installStylesForDoc( |
| 369 | ampdoc, |
| 370 | css, |
| 371 | () => { |
| 372 | this.registerElementInWindow_(ampdoc.win, name, implementationClass); |
| 373 | }, |
| 374 | /* isRuntimeCss */ false, |
| 375 | name |
| 376 | ); |
| 377 | } else { |
| 378 | this.registerElementInWindow_(ampdoc.win, name, implementationClass); |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | /** |
| 383 | * @param {!Window} win |
no test coverage detected