Wednesday, November 17, 2021

Event delegation?

Event delegation is the process of not to add event to a target element , add the event to the parent element.

Use cases for event delegation-

1. When we have an element with lots of its child element that we are interested in .

2.When we want an event handler attached to an element but not exist in DOM when page is loaded .

No comments:

Post a Comment

Element of a good table (Ref: Database design mere mortals by Michael J. Hernandez)

  Elements of the Ideal Table: It represents a single subject, which can be an object or event that reduces the risk of potential data integ...