W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Interaction of dictionaries and platform objects is a bit weird

From: Cameron McCormack <cam@mcc.id.au>
Date: Tue, 23 Jul 2013 13:52:51 +1000
Message-ID: <51EDFE13.2090105@mcc.id.au>
To: Ojan Vafai <ojan@chromium.org>
CC: Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Ojan Vafai wrote:
> On Mon, Oct 22, 2012 at 8:06 PM, Boris Zbarsky <bzbarsky@mit.edu
> <mailto:bzbarsky@mit.edu>> wrote:
>
>     On 10/22/12 9:18 PM, Ojan Vafai wrote:
>
>         A somewhat related issue is that there's no way for a developer
>         to know
>         whether the object being passed in is a dictionary or an object
>         that is
>         actually held onto.
>
>
>     Well, short of looking at the IDL for the method they're calling and
>     then following the link to the definition of the identifier used for
>     the argument in that idl to see whether it's a dictionary or a
>     callback interface, right?
>
>
> Right. I don't think web developers should be expected to find the spec
> and understand the subtleties of webidl. I suppose documentation like
> MDN can fill this gap fairly well though. Maybe it's not that big of a deal.

Yeah, I think documentation is the right place for clarifying this. 
With regular JS APIs, you can't tell if an object you pass in will be 
held on to and used, or if it's for an options-bag kind of argument.  At 
that point, you just have to know what the behaviour of the API is.
Received on Tuesday, 23 July 2013 03:53:26 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC