Tag: events
Event delegation is a great pattern to learn in JavaScript - yet it's still alien to many beginner/intermediate developers. Let's see how it works, and why you need to be using it. We'll even make our own jQuery-style on()
method.
If you allow a user to paste input, how do you sanitise the clipboard data? What if it's been copied from something obscure and comes laden with styling tags? Let's see how we can remove them.
Rounding off this three-part series on JavaScript promises, in this article we'll look at promise events, combining promises with ECMAScript 2017's async/await
combo, plus some of the standard APIs that use or depend on promises.