Skip to content
JavaScript·Intermediate·Conceptual·1 min read

How do preventDefault and stopPropagation differ?

Short interview answer

preventDefault cancels a cancelable browser action such as link navigation or form submission. stopPropagation stops further travel through the propagation path. Neither implies the other.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to DOM events and delegation

Related questions