[heycam/webidl] Should nullable optional dictionary argument have a default value? (#774)

The [Media Session spec](https://w3c.github.io/mediasession/) has the following IDL:

```webidl
dictionary MediaPositionState {
  double duration;
  double playbackRate;
  double position;
};

[Exposed=Window]
interface MediaSession {
  // -- snip --
  void setPositionState(optional MediaPositionState? state);
};
```

Currently the prose says:

> If the type of an argument is a dictionary type or a union type that has a dictionary type as one of its flattened member types, and that dictionary type and its ancestors have no required members, and the argument is either the final argument or is followed only by optional arguments, then the argument must be specified as optional and have a default value provided.

So I understand that the spec requires a default value for optional nullable dictionaries, but is it intended?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/774

Received on Friday, 23 August 2019 04:03:24 UTC