Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demix media load events from GlobalEventHandlers #18311

Merged
merged 11 commits into from
Jul 23, 2022
Merged

Demix media load events from GlobalEventHandlers #18311

merged 11 commits into from
Jul 23, 2022

Conversation

queengooborg
Copy link
Collaborator

This PR demixes the load event handlers for media elements from the GlobalEventHandlers mixin. Related BCD PR: mdn/browser-compat-data#16925

@queengooborg queengooborg requested review from a team as code owners July 13, 2022 11:51
@queengooborg queengooborg requested review from Rumyra and removed request for a team July 13, 2022 11:51
@github-actions github-actions bot added Content:Other Any docs not covered by another "Content:" label Content:WebAPI Web API docs labels Jul 13, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jul 13, 2022

Preview URLs

Flaws

Note! 2 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Mozilla/Firefox/Releases/52
Title: Firefox 52 for developers
on GitHub
Flaw count: 1

  • macros:
    • /en-US/docs/Web/API/Window/appinstalled does not exist

URL: /en-US/docs/Web/API/GlobalEventHandlers
Title: GlobalEventHandlers
on GitHub
Flaw count: 16

  • macros:
    • /en-US/docs/Web/API/GlobalEventHandlers/onabort redirects to /en-US/docs/Web/API/HTMLMediaElement/abort_event
    • /en-US/docs/Web/API/GlobalEventHandlers/oncontextmenu redirects to /en-US/docs/Web/API/Element/contextmenu_event
    • /en-US/docs/Web/API/GlobalEventHandlers/onformdata redirects to /en-US/docs/Web/API/HTMLFormElement/formdata_event
    • /en-US/docs/Web/API/GlobalEventHandlers/onprogress does not exist
    • /en-US/docs/Web/API/GlobalEventHandlers/onratechange does not exist
    • and 8 more flaws omitted
  • bad_bcd_links:
    • no explanation!
    • no explanation!
    • no explanation!

URL: /en-US/docs/Web/API/HTMLMediaElement/loadedmetadata_event
Title: HTMLMediaElement: loadedmetadata event
on GitHub
Flaw count: 1

  • broken_links:
    • Can't resolve /en-US/docs/Introducing_the_Audio_API_Extension

External URLs

URL: /en-US/docs/Mozilla/Firefox/Releases/52
Title: Firefox 52 for developers
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/GlobalEventHandlers
Title: GlobalEventHandlers
on GitHub

No external URLs


URL: /en-US/docs/Web/API/HTMLMediaElement/loadstart_event
Title: HTMLMediaElement: loadstart event
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/HTMLMediaElement/loadedmetadata_event
Title: HTMLMediaElement: loadedmetadata event
on GitHub

No new external URLs


URL: /en-US/docs/Web/API/HTMLMediaElement/loadeddata_event
Title: HTMLMediaElement: loadeddata event
on GitHub

No new external URLs

(this comment was updated 2022-07-23 04:44:33.229316)

@teoli2003
Copy link
Contributor

We also need an HTMLMediaElement/loadend_event page.

@queengooborg
Copy link
Collaborator Author

We also need an HTMLMediaElement/loadend_event page.

Actually, apparently not. @foolip mentioned that loadend isn't an HTMLMediaElement, so the documentation is inaccurate.

@foolip
Copy link
Contributor

foolip commented Jul 13, 2022

That's right. Because media element resources are fetched using range requests, the whole thing might never be loaded at the same time, so there's no event for that, just events like "canplaythrough".

@teoli2003
Copy link
Contributor

So does this mean that this comment:

  • The {{domxref("HTMLMediaElement/loadstart_event", "loadstart")}} and {{domxref("HTMLMediaElement/loadend_event", "loadend")}} events are now fired on {{htmlelement("img")}} elements (see {{bug(1264769)}}).

is wrong?

@queengooborg
Copy link
Collaborator Author

It's possible that Firefox had a non-standard loadend event on HTMLMediaElement, so that changelog comment is not wrong, but the domxref to HTMLMediaElement.loadend_event should be removed. I'm creating a PR for loadend and will remove the link there!

@foolip
Copy link
Contributor

foolip commented Jul 13, 2022

Looks like "loadstart" and "loadend" events for <img> are still in Firefox:
https://bugzilla.mozilla.org/show_bug.cgi?id=1574487

Confirmed with https://software.hixie.ch/utilities/js/live-dom-viewer/?saved=10465.

Copy link
Contributor

@foolip foolip left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't there a loadstart page that needs updating too?

files/en-us/mozilla/firefox/releases/52/index.md Outdated Show resolved Hide resolved
Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. If I'm mistaken, let's open follow-up PRs.

@teoli2003 teoli2003 merged commit 98a0352 into mdn:main Jul 23, 2022
@queengooborg queengooborg deleted the onload-media branch July 23, 2022 04:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Other Any docs not covered by another "Content:" label Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants