W3C home > Mailing lists > Public > public-webrtc@w3.org > June 2012

Re: [ACTION-43] (sdp related objects and global namespace) - way forward

From: Anant Narayanan <anant@mozilla.com>
Date: Mon, 18 Jun 2012 13:06:58 -0700
Message-ID: <4FDF8A62.5000605@mozilla.com>
To: Harald Alvestrand <harald@alvestrand.no>
CC: Adam Bergkvist <adam.bergkvist@ericsson.com>, Dominique Hazael-Massieux <dom@w3.org>, "public-webrtc@w3.org" <public-webrtc@w3.org>
On 6/18/12 4:51 AM, Harald Alvestrand wrote:
> On 06/16/2012 06:57 AM, Anant Narayanan wrote:
>>
>> const SD = PeerConnection.SessionDescription;
>> const IC = PeerConnection.ICECandidate;
>> ...
>> var foo = new SD();
>> var bar = new IC();

> 2 questions:
>
> 1) Anant, can you write out how this should be specified in WebIDL? It's
> not obvious to me that it's even possible to write an interface inside
> another interface.

I think the following is valid:

[NoInterfaceObject]
[Constructor (...)]
interface SessionDescription {
   ...
}

interface PeerConnection {
   attribute Function SessionDescription;
}

Navigator implements PeerConnection;

Speaking from an implementation point of view, PeerConnection.<object> 
is certainly possible. However, Justin and Adam are correct in that 
there aren't a lot of WebAPIs that do this sort of thing. It still is my 
preferred syntax though :)

-Anant
Received on Monday, 18 June 2012 20:07:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:28 UTC