An anticore contract to switch the tabs.
npm i @anticore-contracts/tree-tab
The tree contracts should be added lastly, to improve the performances.
import '@anticore-contracts/tree-tab/on.js'
import '@anticore-contracts/tree-tab/when.js'
- Matches
.anticore .tab
- Searches the related
a[role="tab"][href]
for the response url providing that tab - Searches the closest ancestor containing the previous tab
- Replaces the previous tab by the new one