Skip to content

Require a default value for optional dictionary member of another dictionary? #1511

@saschanaz

Description

@saschanaz

What is the issue with the Web IDL Standard?

A version of #602 for dictionary members. Consider:

dictionary Foo {
  Bar bar;
};

dictionary Bar {};

Given we treat an empty dictionary as nothing-is-passed in arguments, one can expect the same for dictionary; not passing bar would be same as passing {}. But it's not always the case - e.g. in DisplayMediaStreamOptions.video not passing a value may also mean true, or in GPUBindGroupLayoutEntry not passing {} means disabling the feature.

Might want to do the same work as #620 so that such dictionary would set an explicit non-{} default value, and otherwise explicitly get {}.

Context: gpuweb/gpuweb#5249

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions