News
javascript: DOM Events and Microtasks
Building on our knowledge of the event loop we will see how the execution timings of microtasks queued in event listeners can be different depending on how an event is dispatched. … more Read More
Building on our knowledge of the event loop we will see how the execution timings of microtasks queued in event listeners can be different depending on how an event is dispatched. … more Read More
This lesson presses into the deep inner workings of the event loop in order to understand how events fit into the overall javascript execution lifecycle. … more Read More
This lesson will explore what problem passive event listeners are trying to solve, and how you can mark your event listeners as passive to improve scrolling performance. It also covers how some browsers automatically set `touchstart`, `touchmove`, `wheel` … more Read More
Two separate `event` object methods exist for stopping an event: `event.stopPropagation()` and `event.stopImmediatePropagation()`. This lesson will explain the differences between these two functions as well as cautioning you about some dangers in stopping … more Read More
In addition to the browser creating events, it is also possible for you to create and dispatch your own events. … more Read More
Event delegation is a simple, but powerful leveraging of the DOM event system which allows for easier adding of functionality to dynamically created content; as well as being an interesting performance optimization. … more Read More
The `error` and `beforeunload` events have their own bespoke approaches to canceling the event because nothing is easy. … more Read More
There are some deprecated mechanisms for creating events that should be avoided. … more Read More
Does the dispatching of an event queue a future task, or is the event dispatched straight away? And when are event listeners executed? Eventually or straight away? This lesson will show you how dispatching an event occurs synchronously and all event listeners … more Read More
It is common to log `event` objects to the `console`. However, it is important to keep in mind that object properties are evaluated in objects logged to the `console` when the object is first expanded. … more Read More