INNER CODE UNIT · JavaScript
selectPlatform
EricLBuehler/mistral.rs · website/src/main.js:17
function selectPlatform(nextPlatform, moveFocus = false) {
platform = nextPlatform;
for (const tab of tabs) {
const selected = tab.dataset.platform === platform;
tab.setAttribute("aria-selected", String(selected));
tab.tabIndex = selected ? 0 : -1;
if (selected) {
panel.setAttribute("aria-labelledby", tab.id);
if (moveFocus) tab.focus();
}
}
command.textContent = commands[platform];
copyButton.textContent = "Copy";
copyButton.setAttribute(
"aria-label",