Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOM manipulation lesson: add detail about event callback parameter #29344

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mjulmer
Copy link

@mjulmer mjulmer commented Jan 22, 2025

Because

This section was confusing to me when I read it the first time. It wasn't clear to me whether e was a magical keyword or an arbitrary variable name. In theory, I have enough prior exposure to callbacks and event handlers that I could have worked it out on my own, so I imagine it might be even more confusing for learners without that experience.

Some of the other readings in the assignment section also build on this, but the MDN "Introduction to events" isn't among them, and I felt that having it here would be helpful for learners who stumbled where I did.

This PR

  • Adds brief explanation of what the event callback parameter e is and where it comes from.
  • Links to an MDN page with more information.

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

This section was confusing to me when I read it the first time. It wasn't clear to me whether `e` was a magical keyword or an arbitrary variable name. In theory, I have enough prior exposure to callbacks and event handlers that I could have worked it out on my own, so I imagine it might be even more confusing for learners without that experience.

Some of the other readings in the assignment section also build on this, but the MDN "Introduction to events" isn't among them, and I felt that having it here would be helpful for learners who stumbled where I did.
@github-actions github-actions bot added the Content: Foundations Involves the Foundations content label Jan 22, 2025
@mjulmer mjulmer changed the title Add detail about event callback parameter to DOM manipulation section DOM manipulation lesson: add detail about event callback parameter Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: Foundations Involves the Foundations content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant