From 0de98801ca01a03a09cc99d84de9494b1f109016 Mon Sep 17 00:00:00 2001 From: Sergio Madera De Marco <37299705@terciariourquiza.edu.ar> Date: Sun, 24 May 2026 14:56:15 -0300 Subject: [PATCH] ejercicio 5: formulario con validaciones y eventos --- clase-9.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/clase-9.js b/clase-9.js index 131673e..814733f 100644 --- a/clase-9.js +++ b/clase-9.js @@ -30,3 +30,24 @@ listaItems.addEventListener('click', function(event) { }); item.classList.add('seleccionado'); }); + +// Ejercicio 4 - Bubbling y capturing +const externo = document.getElementById('externo'); +const interno = document.getElementById('interno'); +const botonCaptura = document.getElementById('botonCaptura'); + +externo.addEventListener('click', function() { + console.log('bubbling: externo'); +}); + +interno.addEventListener('click', function() { + console.log('bubbling: interno'); +}); + +botonCaptura.addEventListener('click', function() { + console.log('bubbling: button'); +}); + +externo.addEventListener('click', function() { + console.log('capturing: externo'); +}, true);