Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML DOM: Which events do not bubble?

Most events bubble in all browsers. However, I know that in Internet Explorer "submit" events do not bubble. What are the other events that do not bubble?

like image 251
jeremysawesome Avatar asked Apr 06 '11 23:04

jeremysawesome


People also ask

Which method prevent the bubbling up the DOM tree?

stopPropagation() Description: This method prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.

Which of the following options would prevent an event from bubbling up in the DOM in a jQuery event handler where event receives the event object?

To stop the bubbling and prevent handlers on the current element from running, there's a method event. stopImmediatePropagation() . After it no other handlers execute.

Do events bubble by default?

In modern browsers, by default, all event handlers are registered for the bubbling phase. So in our current example, when you click the video, the event bubbles from the <video> element outwards to the <html> element.


2 Answers

HTML frame/object

  • load
  • unload
  • scroll (except that a scroll event on document must bubble to the window)

HTML form

  • focus
  • blur

Mutation

  • DOMNodeRemovedFromDocument
  • DOMNodeInsertedIntoDocument

Progress

  • loadstart
  • progress
  • error
  • abort
  • load
  • loadend

From: https://en.wikipedia.org/wiki/DOM_events#Events

like image 142
Gajus Avatar answered Sep 29 '22 09:09

Gajus


Any events specific to one element do not bubble: focus, blur, load, unload, change, reset, scroll, most of the DOM events (DOMFocusIn, DOMFocusOut, DOMNodeRemoved, etc), mouseenter, mouseleave, etc

like image 43
Nobody Avatar answered Sep 29 '22 07:09

Nobody