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: Fri, 15 Jun 2012 21:50:50 -0700
Message-ID: <4FDC10AA.4040606@mozilla.com>
To: public-webrtc@w3.org
On 06/15/2012 08:16 AM, Dominique Hazael-Massieux wrote:
> Le vendredi 15 juin 2012 à 12:55 +0200, Harald Alvestrand a écrit :
>> Tommy promised to provide more information on this, but apparently
>> stuff
>> that doesn't have constructors isn't accessible from the global JS
>> namespace, so doesn't pollute in the same way - the names are only
>> visible internally in the IDL specifications.
> That's not exactly true; not having constructors just mean that "new
> Foo()" isn't valid, but the interface object is still available in the
> global name space (e.g. you can look at "Foo.prototype" and "typeof Foo"
> is "object"). To avoid this completely, we would need the
> [NoInterfaceObject] extended attribute.
>> We do provide constructors for PeerConnectionEvent,
>> PeerConnectionIceEvent, MediaStreamTrackEvent, MediaStreamEvent and
>> DataChannelEvent.
>> Dom, do all events require constructors?
> They're not required, but my understanding is that they are usually
> expected; they allow developers to trigger events on their own via
> dispatchEvent() for instance.

This is definitely one optimization we can make. I propose we remove all 
the event constructors. Developers wanting to dispatch their own events 
can build them manually.

Received on Saturday, 16 June 2012 04:51:25 UTC

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