[whatwg] Web Storage: structured clones lead to ambiguity in detecting if a key is set w/ getItem()

João Eiras joaoe at opera.com
Wed Sep 23 14:28:20 PDT 2009


On Wed, 23 Sep 2009 23:03:38 +0200, Erik Arvidsson  
<erik.arvidsson at gmail.com> wrote:

> What are the arguments against adding a containsKey method? This would
> map consistently to the in operator and hasOwnProperty in ES5.
> object.containsKey(name) would be mapped to [[GetOwnProperty]](object,
> name) !== undefined in ES5 meta language. That seems most consistent
> to existing APIs.
>

A containsKey or hasItem, preferably, would still not address the  
ambiguity issue.





More information about the whatwg mailing list