This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
"If keySystem is an empty string, return a promise rejected with a new DOMException whose name is InvalidAccessError. If supportedConfigurations was provided and is empty, return a promise rejected with a new DOMException whose name is InvalidAccessError." In general TypeErrors are preferred for invalid arguments. I think in general the existence of InvalidAccessError is a mistake from the days before it was realized that IDL was not a language-agnostic layer. (I will file a WebIDL bug to discuss.) No big deal though.
I've not found any definitive guidance on using TypeError for invalid argument values; but have found examples in both Media Source Extensions and Web Crypto where invalid values return TypeError. I recommend we adopt this practice for consistency with those specifications.
For the record, WebIDL bug filed at https://www.w3.org/Bugs/Public/show_bug.cgi?id=27284; no response as of yet.
I've added a comment to https://www.w3.org/Bugs/Public/show_bug.cgi?id=27284 to indicate EME has a related bug.
We also use InvalidAccessError for invalid formats and invalid operations for the session type. Would this change only apply to basic initial parameter checking (i.e. empty parameters)?
> We also use InvalidAccessError for invalid formats and invalid operations for the session type. I did a review of all the places InvalidAccessError appears. All of them seem related to invalid or unsanitizable objects appearing, and TypeError would fit, except > If this object's session type is not "persistent", return a promise rejected with a new DOMException whose name is InvalidAccessError. and > Otherwise > Reject promise with a new DOMException whose name is InvalidAccessError. (below 'If sessionType is "persistent"') which seems like they should be RangeError.
Migrated to https://github.com/w3c/encrypted-media/issues/103.