Open kirandash opened 1 year ago
Please create an MCQA to be added as question number 45.
The multiple choice question should be on the topic "Event Bubbling & Event Capturing". The difficulty level should be "Easy/Medium"
Tasks:
Explanation:
event.target
event.stopPropagation()
addEventListener(evt, fn, phase)
Qns that are asked in interviews:
addEventListener("click", btn, true)
Please create an MCQA to be added as question number 45.
The multiple choice question should be on the topic "Event Bubbling & Event Capturing". The difficulty level should be "Easy/Medium"
Tasks:
Explanation:
event.target
returns the reference of element which raised the eventevent.stopPropagation()
addEventListener(evt, fn, phase)
phase: false by default - bubble phase, add it as true to make capture phaseQns that are asked in interviews:
event.stopPropagation()
addEventListener("click", btn, true)
event.target