[Bug 25594] The read-only attribute usableKeyIds cannot be variable length

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25594

--- Comment #4 from David Dorwin <ddorwin@google.com> ---
(In reply to Anne from comment #3)
> The pattern we try to advocate people to use for now is return an object (as
> IDL does not allow returning a sequence) and define in prose that you return
> a JavaScript Array Object that represents a snapshot of the underlying data.
> Whenever you update the underlying data, you also need to create a fresh
> snapshot object. 
> 
> So you end up with two variables (underlying data, Array object) and an
> update algorithm.

Are you saying that the following is the recommended style?
  object getUsableKeyIds();

Is that preferred to asynchronously looking up the data only when queried? For
example:
  Promise<object> getUsableKeyIds();
where the promise is resolved with an object that is a JavaScript Array Object
that represents a snapshot of the underlying data.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Wednesday, 11 June 2014 22:20:44 UTC