diff --git a/2-ui/2-events/02-bubbling-and-capturing/article.md b/2-ui/2-events/02-bubbling-and-capturing/article.md index decc25154..631c1f697 100644 --- a/2-ui/2-events/02-bubbling-and-capturing/article.md +++ b/2-ui/2-events/02-bubbling-and-capturing/article.md @@ -1,24 +1,24 @@ -# Bubbling and capturing +# Propagación y captura -Let's start with an example. +Vamos a empezar con un ejemplo. -This handler is assigned to `
`, but also runs if you click any nested tag like `` or ``: +Este manejador está asignado a `
`, pero también se ejecuta si haces clic a cualquier elemento anidado como `` ó ``: ```html autorun height=60 -
- If you click on EM, the handler on DIV runs. +
+ Si haces clic enEM, el manejador en DIV es ejecutado.
``` -Isn't it a bit strange? Why does the handler on `
` run if the actual click was on ``? +¿No es un poco extraño? ¿Por qué el manejador en `
` es ejecutado, si el clic fue hecho en ``? -## Bubbling +# Propagación -The bubbling principle is simple. +El principio de propagación es simple. -**When an event happens on an element, it first runs the handlers on it, then on its parent, then all the way up on other ancestors.** +**Cuando un evento ocurre en un elemento, este primero ejecuta los manejadores que tiene asignados, luego los manejadores de su padre, y así hasta otros ancentros.** -Let's say we have 3 nested elements `FORM > DIV > P` with a handler on each of them: +Dígamos que tenemos 3 elementos anidados `FORM > DIV > P` con un manejador en cada uno de ellos: ```html run autorun