Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE html>
<script src="support/fake-selectlist.js"></script>
<body>
<script>
const selectlist = createFakeSelectlist('button', /*includeListbox=*/true);
document.body.appendChild(selectlist);
selectlist.querySelector('button').remove();
selectlist.insertAdjacentHTML('afterbegin', `<button>button</button>`);
const listbox = selectlist.querySelector('.fake-selectlist-listbox');
listbox.innerHTML = `
<option id=optone tabindex=0>one</option>
<option>two</option>
`;
document.getElementById('optone').focus();
</script>