skip to Main Content

Where do you suggest that keyboard constants be added to Javascript?

I saw this code here: myCombobox.addEventListener('keydown', function(event) { if (event.key === 'Escape') { myCombobox.close(); event.stopPropagation(); } }); My education and experience tells me that the code should be comparing a constant. myCombobox.addEventListener(MouseEvents.KEYDOWN, function(event) { if (event.key === KeyboardConstants.ESCAPE) { myCombobox.close();…

VIEW QUESTION
Back To Top
Search