extensions/amp-carousel/0.1/build-dom.js
/**
 * Builds the DOM necessary for slidescroll carousel.
 * @param {Element} element
 * @return {{
 *   prevButton: HTMLDivElement,
 *   nextButton: HTMLDivElement
 *   container?: HTMLDivElement
 *   cells?: HTMLDivElement[]
 *   slides?: HTMLDivElement[]
 *   slidesContainer?: HTMLDivElement
 *   slideWrappers?: HTMLDivElement[]
 * }}
 */
Builds the DOM necessary for slidescroll carousel.
Builds the DOM necessary for slidescroll carousel .
function buildDom(element) {
  const slideCount = realChildElements(element).length;
  const slidesDom = isScrollable(element)
    ? buildScrollableCarousel(element)
    : buildSlideScrollCarousel(element);
  const controlsDom = buildCarouselControls(element, slideCount);
  return {...controlsDom, ...slidesDom};
}
function buildDom ( element ) { const slideCount = realChildElements ( element ) . length ; const slidesDom = isScrollable ( element ) ? buildScrollableCarousel ( element ) : buildSlideScrollCarousel ( element ) ; const controlsDom = buildCarouselControls ( element , slideCount ) ; return { ... controlsDom , ... slidesDom } ; }
Builds the DOM necessary for slidescroll carousel.
Builds the DOM necessary for slidescroll carousel .