Mixin which provides for automatic timed changes in selection.
This mixin is useful for creating slideshow-like elements such as basic-slideshow and basic-slideshow-with-controls.
Typical usage:
class CarouselWithTimer extends TimerSelectionMixin(Carousel) {}
customElements.define('carousel-with-arrows', CarouselWithTimer);
This mixin expects the component to define an items property, as well as
selectFirst and selectNext methods. You can implement those yourself,
or use ContentItemsMixin and
SingleSelectionMixin.
Kind: global class
- TimerSelection
- .pause()
- .play()
- .playing :
boolean - .selectionTimerDuration :
number
Pause automatic progression of the selection.
Kind: instance method of TimerSelection
Begin automatic progression of the selection.
Kind: instance method of TimerSelection
True if the selection is being automatically advanced.
Kind: instance property of TimerSelection
Default: false
The time in milliseconds that will elapse after the selection changes before the selection will be advanced to the next item in the list.
Kind: instance property of TimerSelection
Default: 1000 (1 second)