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

BufferedChangeEventInit shouldn't be optional in BufferedChangeEvent constructor #349

Open
jyavenard opened this issue Mar 6, 2024 · 1 comment · Fixed by #350
Open
Assignees

Comments

@jyavenard
Copy link
Member

The constructor of the BufferedChangeEventInit is defined as optional
(https://www.w3.org/TR/media-source/#dom-bufferedchangeevent)

interface BufferedChangeEvent : Event {
  constructor(DOMString  type, optional BufferedChangeEventInit eventInitDict = {});

https://www.w3.org/TR/media-source/#dom-bufferedchangeeventinit

Given that a BufferedChangeEvents are always browser generated, making the BufferedChangeEventInit mandatory is preferred.

@jyavenard jyavenard self-assigned this Mar 6, 2024
@jyavenard jyavenard changed the title BufferedChangeEventInit shouldn't be optional BufferedChangeEventInit shouldn't be optional in BufferedChangeEvent constructor Mar 6, 2024
jyavenard added a commit to jyavenard/media-source that referenced this issue Mar 18, 2024
@tidoust
Copy link
Member

tidoust commented Mar 21, 2024

The argument had been made optional by #342 because Web IDL mandates that a dictionary argument must be optional if it has no required fields.

Dropping the optional keyword made the Web IDL invalid again, which triggered the proposed automatic fix in #351 to reintroduce the optional keyword. I'm going to merge #351 to make the Web IDL valid (needed by spec crawlers). If you'd like to make the argument mandatory, that needs to be captured in the construction algorithm (which isn't specified yet, see #345), or something else needs to change.

@tidoust tidoust reopened this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants