mdn / learning-area

GitHub repo for the MDN Learning Area.
https://developer.mozilla.org/en-US/Learn
Creative Commons Zero v1.0 Universal
7.01k stars 27k forks source link

Replace onchange with EventListener method #773

Closed bhagyeshsp closed 1 week ago

bhagyeshsp commented 2 weeks ago

The MDN example that redirects to this code uses EventListener method to detect change in select element. I learned that standard practice is using EventListener method, hence the change.

bsmth commented 1 week ago

Content equivalent:

https://github.com/mdn/content/blob/fd9a16a3a56e295eb80fc24a5dbd56a842b2958e/files/en-us/learn/javascript/building_blocks/conditionals/index.md?plain=1#L127

bhagyeshsp commented 1 week ago

Thank you so much @bsmth for approving and validating my understanding!