Skip to content

Commit

Permalink
Do not expect 'include optional support' in example
Browse files Browse the repository at this point in the history
  • Loading branch information
Valerie Young committed Jan 13, 2021
1 parent ad00ce0 commit 3aade06
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions examples/disclosure/js/disclosureMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,14 @@ window.addEventListener(

// listen to arrow key checkbox
var arrowKeySwitch = document.getElementById('arrow-behavior-switch');
arrowKeySwitch.addEventListener('change', function () {
var checked = arrowKeySwitch.checked;
for (var i = 0; i < disclosureMenus.length; i++) {
disclosureMenus[i].updateKeyControls(checked);
}
});
if (arrowKeySwitch) {
arrowKeySwitch.addEventListener('change', function () {
var checked = arrowKeySwitch.checked;
for (var i = 0; i < disclosureMenus.length; i++) {
disclosureMenus[i].updateKeyControls(checked);
}
});
}

// fake link behavior
var links = document.querySelectorAll('[href="#mythical-page-content"]');
Expand Down

0 comments on commit 3aade06

Please sign in to comment.