...

/

Increasing Efficiency by Attaching DOM to the Parent Element

Increasing Efficiency by Attaching DOM to the Parent Element

Learn how the usage of DOM can increase efficiency, as mouse events need a lot of elements to be attached individually.

We'll cover the following...

Experienced front-end developers know that creating many events on a page is a recipe for bad performance. In our previous example, we created three events for each row. If we get 100 earthquakes on the list, we would have 300 events floating around the page just to do some light highlighting work! That is terrible for performance, and we can do better.

Because events in DOM always bubble up—from children to parent elements—a well-known technique among front-end developers to avoid attaching ...

Access this course and 1400+ top-rated courses and projects.