}
TouchBar.TouchBarScrubber = class TouchBarScrubber extends TouchBarItem {
- constructor(config) {
+ constructor (config) {
super()
if (config == null) config = {}
const {items, onSelect, onHighlight} = config
if (typeof onSelect === 'function' || typeof onHighlight === 'function') {
this.onInteraction = (details) => {
if (details.type === 'select') {
- onSelect(details.selectedIndex);
+ onSelect(details.selectedIndex)
} else if (details.type === 'highlight') {
- onHighlight(details.highlightedIndex);
+ onHighlight(details.highlightedIndex)
}
}
}