7. Interacting with the User Through Events
In this chapter, you learn how to interact with users by creating and executing events. Up to this point, you (as the developer) have been in full control over all the conditions in which your functions get executed. You’ve learned how to create functions, build loops, store data, and travel around the DOM. All the interaction controls have been right at your fingertips. A lot of the behind-the-scenes part of an application works this way, but it’s only half the battle. You won’t always have control over when certain functions get executed. You’ll often need to let the user decide when it’s best to utilize a certain function. These are called events.
Events are triggered in the browser when something ...
Get Learning JavaScript: A Hands-On Guide to the Fundamentals of Modern JavaScript now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.