DOM Manipulation & Events
Make pages interactive by reading and updating the DOM, handling user events efficiently and keeping the UI in sync with data.
3 objectives 6 steps about 120 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Select, create, update and remove DOM nodes, inserting user-supplied text safely with textContent instead of innerHTML.
- Handle user input with addEventListener, explaining capture, bubbling and default actions, and use event delegation for dynamic lists.
- Render a list UI from a data array, re-render it after each state change, and persist that state with localStorage.
Lesson plan
6 steps, about 120 min · 5 of 5 lessons available so far
- The DOM as a Live Tree Concept · 15 min
- Changing the Page Safely Worked example · 20 min
- Listeners, Propagation and Default Actions Concept · 25 min
- Lab: A Filterable List Driven by One Delegated Listener Lab · 30 min
- Keeping UI and Data in Sync, and Remembering It Concept · 15 min
- Check: Find and Fix the Interaction Bugs Knowledge check · 6 questions
Practise it
Build a vanilla-JavaScript shopping list where items can be added, edited, completed, filtered and deleted with full keyboard support, using one delegated listener on the list, persisting state to localStorage, and never passing user text to innerHTML.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
- Build your own Browser GameIntro · 4–10 h
- Build your own ReactIntermediate · 6–12 h
References
Hard prerequisites
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.