Choices — Events
Listen for add, remove, and choice events; sync a summary with textContent.
Live summary
No tags yet.
Event log appears here.
Important JavaScript
select.addEventListener("addItem", function (event) {
summary.textContent = "Added: " + event.detail.value;
});
select.addEventListener("removeItem", function (event) {
summary.textContent = "Removed: " + event.detail.value;
});