Home & blog

Tag: events

Event delegation in JavaScript

1 Nov 2020 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.

Adventures with the Clipboard API

22 Mar 2020 events

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.

JavaScript Promises part 3: Wrapping up

28 Jun 2019 events

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.