W3C home > Mailing lists > Public > public-html-media@w3.org > June 2016

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

From: ddorwin via GitHub <sysbot+gh@w3.org>
Date: Wed, 08 Jun 2016 17:48:39 +0000
To: public-html-media@w3.org
Message-ID: <issues.opened-159230312-1465408118-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.3.1 : Wednesday, 8 June 2016 17:48:41 UTC