-
Notifications
You must be signed in to change notification settings - Fork 59
Lesson 14 (DOM & Events)
Courtney Frey edited this page Apr 14, 2022
·
3 revisions
- JavaScript in the browser and in Node.js are two different environments.
- DOM objects and methods are used to alter an HTML web page.
- That JavaScript is an event driven language.
- To handle events in JavaScript using the
addEventListener
function. - What it means to trigger an event.
- Check with your class Candidate Engagement Manager for any announcements.
- Welcome to Day 20!
- Assignment 4 is due by end of Day 23. Will have work time Days 21 and 22.
- Point out that JavaScript is included in a web page by using
<script>
tags. - Functions being passed as arguments to
addEventListener
will likely confuse some students. - If event handling isn't working, remind the students to double check the HTML and the JavaScript to be sure the correct elements are being referenced. As always, typos will make your code fail.
- Making sure the students understand that the DOM represents the page, can respond to user actions, and can be used to edit the HTML.
- Encourage use of the developer tools in the browser.
- This is a GREAT studio for automatic, positive feedback ("LOOK! The rocket moves where I tell it to!"). Absolutely encourage your students to play beyond the given tasks.
- Common student stumbling blocks:
- Depending on your students' questions, consider a quick group reminder on how to:
- Find and fork the starter code GitHub repository.
- Clone the remote repository to a local folder.
- There is a fair amount of starter code for this studio. Some students will find that overwhelming, which could cause them to delay starting.
- If this issue is widespread in your group, be ready to review the starter HTML with your students. Provide tips for where to start.
- Depending on your students' questions, consider a quick group reminder on how to:
- Syntax errors can be tricky to find in this studio. Be patient. Encourage your students to proceed one small step at a time (code works, make small change, ensure code still works, make change, etc.).
- Encourage quick-finishers to try the bonus mission.