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

Parser doesn't accept the correct syntax for required [XAttr] typename attributename; #70

Open
padenot opened this issue Apr 29, 2022 · 0 comments

Comments

@padenot
Copy link

padenot commented Apr 29, 2022

Here are two fragments of WebCodecs WebIDL:

dictionary AudioDecoderConfig {
  required DOMString codec;
  [EnforceRange] required unsigned long sampleRate;
  [EnforceRange] required unsigned long numberOfChannels;
  BufferSource description;
};

and

dictionary AudioDecoderConfig {
  required DOMString codec;
  required [EnforceRange] unsigned long sampleRate;
  required [EnforceRange] unsigned long numberOfChannels;
  BufferSource description;
};

The former is incorrect per spec, and the latter is the correct way to do this. Chromium's parser accepts the correct syntax (https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/webcodecs/audio_decoder_config.idl;l=10-22?q=audiodecoderconfig&ss=chromium&start=11 is what they have in tree). Similarly, Firefox's WebIDL parser only accepts the correct syntax.

widlparser only seem to accept the syntax of the former example, and this is what we have in the spec today, but we'd like to merge w3c/webcodecs#488 to align with actual implementations.

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