- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Wed, 26 Jun 2013 10:43:09 -0400
- To: Marcos Caceres <w3c@marcosc.com>
- CC: public-script-coord@w3.org
On 6/26/13 10:39 AM, Marcos Caceres wrote:
> Yes, the developer needs to be able to monitor changes to the array.
As in get notified when it changes? Or as in always see whatever the
state is now as opposed to what it was then?
Again, this is "just" (I put it in quotes, because it's actually really
important) an API design issue.
> Small question: there is an event defined for monitoring changes to the Calls array in the API ("callschanged" and corresponding "oncallschanged" event handler attribute) which I think kinda sucks (hence my previous email asking about using Object.observe) - I wanted to get rid of the event. Is there some way of monitoring this array without an event?
There is not, no.
> Object.observe(telephony.calls, function(details){...}) feels really right here.
You can't have that for a readonly array, sadly, because it would
involve the UA being able to change the properties as own value
properties, which would mean the page can do it too...
-Boris
Received on Wednesday, 26 June 2013 14:43:42 UTC