Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Advanced JavaScript

You're reading from   Advanced JavaScript Speed up web development with the powerful features and benefits of JavaScript

Arrow left icon
Product type Paperback
Published in Jan 2019
Publisher
ISBN-13 9781789800104
Length 330 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Zachary Shute Zachary Shute
Author Profile Icon Zachary Shute
Zachary Shute
Arrow right icon
View More author details
Toc

DOM Events and Event Objects


DOM events are the backbone of functional and responsive web applications. Events are used in any website that has any form of user interaction. Websites such as Facebook, Google, and Skype all heavily make use of events. An event is a signal that tells the programmer that something has happened to a DOM node. An event can be fired for nearly any reason. We can use JavaScript to listen for events and run functions when an event occurs.

DOM Event

A DOM event is a notification sent by a DOM node to let the programmer know that something has happened to the DOM node. This can be anything from a user clicking on an element or pressing a key on the keyboard to video playback ending. There are a lot of events that can be fired. Every event that can be fired can have an event listener attached to it. An event listener is an interface that waits for an event to fire and then calls an event handler. An event handler is code that is run in response to an event. Event handlers...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image