Skip to content Skip to sidebar Skip to footer

Js Events That Don't Bubble (progress, Loadedmetadata, Etc)

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 suppos

Solution 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... :)

Solution 2:

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.

Solution 3:

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.

Post a Comment for "Js Events That Don't Bubble (progress, Loadedmetadata, Etc)"