0

I found out that certain events on the video/audio tag don't bubble (loadedmetadata, progress, etc). Is this against the standard or is it common for other events?

How am I supposed to know what events are supposed to bubble or not bubble?

animuson
  • 53,861
  • 28
  • 137
  • 147
jdw
  • 1,533
  • 3
  • 17
  • 26

3 Answers3

1
  1. You can test it...
  2. readonly attribute boolean bubbles; check this property of the event.

bubbles of type boolean, readonly

Used to indicate whether or not an event is a bubbling event. If the event can bubble the value is true, else the value is false.

w3 source not w3School... :)

gdoron
  • 147,333
  • 58
  • 291
  • 367
1

Bubbling events are usually those that need to bubble. Like if you click an element, you are also clicking its parents so it must bubble. But when a progress happens on a media element, it doesn't really happen on its parents the way keyup, click, mouseover etc do.

Esailija
  • 138,174
  • 23
  • 272
  • 326
1

Look in the specs. gdoron already posted a link to them and explained the each Event has an attribute indicating whether it bubbles or not - only useful when you have the event already.

Yet, look further down in that spec: In the Event module definitions there is an overview of events and whether they bubble or not. Also, you will finde more events in the DOM-Level3-Draft.

Also, you asked progress events. They are only a draft, but in the section about proposed events you can find that they are not supposed to bubble.

Bergi
  • 630,263
  • 148
  • 957
  • 1,375