Closed iherman closed 6 years ago
On second though... maybe it is cleaner to set the default value for all values that return an array to []
and not to undefined
, in which case there is no reason to single out the resource list.
In a way... what is the rationale, in our manifest, to set the resource list as required, if its value may be empty?
I don't think that resources
should be required and it's default value should be an empty array in our WebIDL.
Ok. I am fine with that.
@HadrienGardeur #305 (ie, also the latest draft) covers that in terms of https://github.com/w3c/wpub/issues/303#issuecomment-412575203. If you agree, can you also close this issue?
Only change I made post-commit of #305 was to remove the default array on reading order. Required values can't have a default, which tends to make sense.
Only change I made post-commit of #305 https://github.com/w3c/wpub/pull/305 was to remove the default array on reading order. Required values can't have a default, which tends to make sense.
Yep, I saw that, and you're right.
The current text says that the 'resources' is a required item; the WebIDL does not say that. Shouldn't it be set to "required", too?
Note that setting it to required in the WebIDL does not mean that there must be a list of resources. It just mean that, in an implementation, it would have a default value, which is
[]
(empty list) as opposed to other, non-required properties that have a default 'undefined' value.