[encrypted-media] It may not be possible to return undefined from MediaKeyStatusMap.get()

ddorwin has just created a new issue for 
https://github.com/w3c/encrypted-media:

== It may not be possible to return undefined from 
MediaKeyStatusMap.get() ==
The 
[definition](https://w3c.github.io/encrypted-media/#widl-MediaKeyStatusMap-get-MediaKeyStatus-BufferSource-keyId)
 of `MediaKeyStatusMap`'s `get()` method says:
> Returns the `MediaKeyStatus` of the key identified by _keyId_ or 
`undefined` if the status of the key identified by _keyId_ is not 
known.

This text was added for #70 with the goal of being consistent with the
 [ES6 Map interface's 
get()](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-map.prototype.get).
 We cannot just use `maplike` for the reasons in #25 and #39.

In an implementation discussion, @foolip said, "The IDL says that the 
return value is a MediaKeyStatus, and undefined is not of that type."

Is there a way we can be consistent with the behavior of `Map`?

Please view or discuss this issue at 
https://github.com/w3c/encrypted-media/issues/233 using your GitHub 
account

Received on Wednesday, 8 June 2016 17:48:41 UTC