Wednesday, November 17, 2021

what is Event bubbling?

 If any event fired on a DOM element it will also fired on all of its parent element which is called the event bubbling.

So, the element event first fired is called the target element.

Ex:

<main>

     <section>

         <p>

                <button>

                          target  element        //event first fired on button element so it is called the target                                                                        element.

              </button>

         </p>

     </section>

</main>

This target element will store in the event object as property .

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...