On Tue, Aug 25, 2015 at 2:16 PM, Ehsan Akhgari <ehsan....@gmail.com
> On 2015-08-25 4:07 PM, Martin Thomson wrote:
>> WebRTC was shipped with a prefix.
>> Bug 1155923 moves our codebase to non-prefixed names, but includes a
>> patch to restore aliases with the prefix. Thus we will expose
>> `RTCPeerConnection` and use that ourselves, but permit legacy code to
>> use `mozRTCPeerConnection`.
> Is our RTCPeerConnection and the corresponding spec considered as stable?
Stable enough to use the name, certainly [see
]. But maybe that wasn't your
The core parts of the spec are stable and have been for years. There
are parts that are still unstable. I don't expect that to change
appreciably for some time, even though the W3C working group has a
goal for a big 1.0 release.
>> Maybe some day we can remove the aliases by just backing out the patch
>> that creates prefixed aliases, but that seems unlikely in the short
>> term .
> Do the aliases only work when you call them or can the webpage also detect
> them? IOW, what would code like below do?
> if (window.mozRTCPeerConnection)
> else if (window.RTCPeerConnection)
The following code would call foo(). In the patch that I have,
mozRTCPeerConnection looks exactly like RTCPeerConnection. That means
that window.mozRTCPeerConnection is present, can be instantiated, can
be tested with instanceof, and can be passed to any functions that
accept RTCPeerConnection (there aren't any that I can think of there).
The only difference I'm aware of is that constructing the prefixed
version drops a polite warning (using document->WarnOnceAbout()) into