[Bug 26372] Report issues/events not related to a specific method call

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

--- Comment #21 from Mark Watson <watsonm@netflix.com> ---
(In reply to David Dorwin from comment #20)
> (In reply to Mark Watson from comment #18)
> > Can't this be an attribute with type Sequence<KeyStatus> where KeyStatus is
> > an interface with attributes keyid (ArrayBuffer) and status (enum) ?
> 
> In bug 25594, we decided to use a Promise-returning method instead of an
> attribute. See that bug for the relevant discussion.
> 
> That said, we could return Promise<sequence<KeyStatus>> where KeyStatus is
> as you defined. It seems a bit of an overkill to define an interface just
> for this, but some architectural guidance would be helpful here.

Agreed.

In 25594, the problem was that you cannot have a variable-length array or a
sequence as an attribute type: you have to define a getter method instead (I
believe to make it clear that you will get a copy of the object, not a
reference to a 'live' object).

I guess we could still have a synchronous getter method and an event to
indicate when the value is going to change.

It just seems the promise model is wrong for something which can asynchronously
change multiple times, rather than something which just takes time to compute.

> 
> > There could then be a simple event when this changes.
> > 
> > Or (IIUC) the attribute could be [Observable], if that is not too
> > new-fangled.
> 
> Do you have a reference for [Observable]? I'd like to understand how that
> might apply.

I forget where I saw a reference to it. I believe
http://wiki.ecmascript.org/doku.php?id=harmony:observe is getting attention
right now and [Observable] is an idea for an IDL keyword that would indicate
that the Object.observe pattern can be used with an attribute. I expect Boris
and Anne know more.

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

Received on Wednesday, 17 September 2014 17:40:10 UTC