Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

instead of .addEventListener('change') , in mine addEventListener('click') is what triggers the break...

Difference between video and mine:

Mine triggers highlight of 'target' in click listener ul.addEventListener('click', (e) => { if (e.target.tagName === 'BUTTON') {

Video triggers highlight of '(e)' in change listener ul.addEventListener('change', (e) => { const checkbox = e.target;

Just as he does in the video, among Event Listener Breakpoints, I have selected Control > change.

Why does my Chrome browser not hear the change event, instead only recognizing a click?

1 Answer

Nevermind. I figured out that I needed to refresh the page before each test. Instead, I clicked the checkbox, then used the "Step Out of the Current Function" icon to get out and allow me to unchecked the box. Used "Step Out..." again to get back to where I could check the box again. But when you do this, the second time you check the box will not have the same result as the first time. So that explains the difference I was seeing.