W3C home > Mailing lists > Public > public-media-capture@w3.org > August 2013

Re: Dictionaries as return values

From: Tommy Widenflycht <tommyw@google.com>
Date: Wed, 21 Aug 2013 15:22:52 +0200
Message-ID: <CALLKCfNoteKuMrg8U5SMiG=s4hsHTUgg+dZYH7ur5ka6+7BVZQ@mail.gmail.com>
To: "Robert O'Callahan" <robert@ocallahan.org>
Cc: "public-media-capture@w3.org" <public-media-capture@w3.org>
Thanks! It makes a lot of sense that Dictionaries also can be output
objects and not just input.


On Wed, Aug 21, 2013 at 6:31 AM, Robert O'Callahan <robert@ocallahan.org>wrote:

> On Wed, Aug 21, 2013 at 2:06 AM, Tommy Widenflycht <tommyw@google.com>wrote:
>
>> I have tried to parse the WebIDL spec and can find no evidence that this
>> is allowed by looking at the grammar. The text seems to indicate that it is
>> possible however.
>
>
> The grammar allows the [ReturnType] nonterminal to expand to an
> identifier, which can then denote a dictionary, as the following text says:
> http://www.w3.org/TR/WebIDL/#dfn-return-type
>
>> If the return type is an identifier<http://www.w3.org/TR/WebIDL/#dfn-identifier>or an identifier followed by
>> ?, then the identifier MUST identify an interface, dictionary,
>> enumeration <http://www.w3.org/TR/WebIDL/#dfn-enumeration>, callback
>> function <http://www.w3.org/TR/WebIDL/#dfn-callback-function> or typedef<http://www.w3.org/TR/WebIDL/#dfn-typedef>
>> .
>>
> So this is definitely allowed by WebIDL.
>
> Rob
> --
> Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
> le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
> stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
> 'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
> waanndt  wyeonut  thoo mken.o w  *
> *
>
Received on Wednesday, 21 August 2013 13:23:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:26:18 UTC