Question
Option 4 : the button's listener runs first, then the event bubbles outward to the div's listener. / बटन का श्रोता पहले चलता है, फिर इवेंट बाहर की ओर बबल होकर div के श्रोता तक पहुँचता है।
Detailed Solution
सही उत्तर the button's listener runs first, then the event bubbles outward to the div's listener. / बटन का श्रोता पहले चलता है, फिर इवेंट बाहर की ओर बबल होकर div के श्रोता तक पहुँचता है। है।
Question:
A button sits inside a div. Both have click listeners registered for the bubble phase. When the button is clicked, / एक बटन div के भीतर है। दोनों में बबल चरण हेतु क्लिक श्रोता पंजीकृत हैं। बटन क्लिक करने पर,
Correct Answer: the button's listener runs first, then the event bubbles outward to the div's listener. / बटन का श्रोता पहले चलता है, फिर इवेंट बाहर की ओर बबल होकर div के श्रोता तक पहुँचता है।
In the bubble phase the event travels from the target outward through ancestors, so the innermost listener fires first. / बबल चरण में इवेंट लक्ष्य से बाहर की ओर पूर्वजों से होकर जाता है, अतः सबसे भीतरी श्रोता पहले चलता है।