btholt / btholt/intro-to-web-dev-v2

Event Delegation Example Issue

Open
#29 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.5k
Forks
183
PR merge metrics
No merged PRs in 30d

Description

Hello!

Just went through the wonderful Intro to Web Development v2 course on FEM and ran into a small issue.

At https://btholt.github.io/intro-to-web-dev-v2/dom/#event-delegation when you add the if statement to check if something within the container is a button before firing the alert function (the code in the video is "if (event.target.tagName === 'button')"), the code does not work. Also, the playground stops working, even if you remove the if statement to return the code to what it was by default.

Thanks!
Krista

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open the Event Delegation section at the linked DOM course page and reproduce the problem in its playground with and without the conditional shown in the issue. Trace the example's event-delegation code and verify that the button check works and that the playground remains functional after the change.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.