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

Guideline for HTML element APIs #900

Open
foolip opened this issue Apr 16, 2024 · 0 comments
Open

Guideline for HTML element APIs #900

foolip opened this issue Apr 16, 2024 · 0 comments

Comments

@foolip
Copy link
Collaborator

foolip commented Apr 16, 2024

We have a mix of styles in descriptions so far:

  • The fastSeek() method seeks an <audio> or <video> element as fast as possible, by seeking to a keyframe instead of
    exactly the requested time.
  • The preservesPitch property for <audio> or <video> adjusts the pitch of audio to sound more natural when the playback rate is faster or slower than the default.
  • The showPicker() method for <input> elements shows the user interface for picking a value. For example, for <input type="date"> it shows the interface for picking a date.
  • The showPicker() method for <select> elements shows the dropdown menu or other user interface for picking one of the options.
  • Whatever we land on in Split <slot> into two features and add statuses #880.

We should document if we say <thing>, <thing> element, or HTMLThingElement.

The reason I have gone with <audio> and <video> is that it's less obvious what HTMLMediaElement is. And there are APIs that are only on HTMLAudioElement or HTMLVideoElement. Using the interface names here would mean no overlap talking about HTMLMediaElement for fastSeek(), but HTMLVideoElement for requestVideoFrameCallback(). I liked having <video> in both descriptions.

The downside with saying <audio> and <video> is that it's not as technically correct. Those strings refer to HTML syntax, but are used as a shorthand for everything about that element, including not just parsing rules but also APIs and all the algorithms for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant