if you wouldn’t use jQuery, it would be easy. define the first a bubbling and the second a capturing event handler (though that has problems with older IEs).
i have no idea how promise works
in very short words, a Promise is a yet unknown value that is given a success handler and an error handler, of which that either is executed once the value is created or its creation failed. you could say it’s a little bit like Schrödinger’s Cat. it’s more about asynchronity than events.