src/components/ebay-tab/index.js
function getElementIndex(headingEl) {
    return Array.prototype.slice.call(headingEl.parentNode.children).indexOf(headingEl);
}
function getElementIndex(headingEl) {
    return Array.prototype.slice.call(headingEl.parentNode.children).indexOf(headingEl);
}
function getElementIndex ( headingEl ) { return Array . prototype . slice . call ( headingEl . parentNode . children ) . indexOf ( headingEl ) ; }
Get 0-based index of element within its parent
@param {HTMLElement} headingEl
Get 0 - based index of element within its parent