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 Dec 4, 2020
1 parent 17a2673 commit 9f6690a
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 (event) {
var checked = arrowKeySwitch.checked;
for (var i = 0; i < disclosureMenus.length; i++) {
disclosureMenus[i].updateKeyControls(checked);
}
});
if (arrowKeySwitch) {
arrowKeySwitch.addEventListener('change', function (event) {
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 9f6690a

Please sign in to comment.