Skip to main content

DOM event phases and delegation

Distinguish target and currentTarget. Explain how a parent can handle clicks on items inserted later.

Official Reference

Model Answer & Explanation

An event travels through capture toward the target, then through bubbling for events that bubble. target identifies where it originated in an ordinary DOM tree and currentTarget is where the current listener was registered. A delegated parent can find the relevant child with closest and verify it belongs inside the boundary. stopPropagation and preventDefault solve different problems.

Follow-up Interview Question · What changes for focus, which does not bubble?

Module Context & References

JavaScript · Runtime & browser theory Explain the event loop, promises, rate limiting and DOM event flow
Personal Notes · Markdown

Technologies & Interview Topics Covered

Switch between short-term interview tracks and long-term 80/20 engineering depth to practice JavaScript internals, React rendering and hooks, timed frontend machine coding UI challenges, MeetaPro FG300, Blind 75 & NeetCode 150 DSA patterns, Python & FastAPI APIs, PostgreSQL query optimization & MVCC, Redis caching, Applied AI RAG pipelines & evaluations, and distributed system design.