W3C home > Mailing lists > Public > public-webrtc@w3.org > August 2015

Re: Naming question to resolve: state vs. readystate vs connectionstate

From: Adam Bergkvist <adam.bergkvist@ericsson.com>
Date: Tue, 25 Aug 2015 08:37:31 +0000
To: Peter Thatcher <pthatcher@google.com>, "public-webrtc@w3.org" <public-webrtc@w3.org>
Message-ID: <A222C88B6882744D8D4B9681B315889024012F62@ESESSMB307.ericsson.se>
On 2015-08-24 20:57, Peter Thatcher wrote:
> A question came up in the PR for IceTransport.DtlsTransport
> https://github.com/w3c/webrtc-pc/pull/241 about the name of the "state"
> attribute.  Which name should we have?
>
>
> Option A (What's in there, simplest name):
>
> IceTransport.state
> IceTransport.onstatechange
> DtlsTransport.state
> DtlsTransport.onstatechange
>
> Option B (Matches DataChannel, WebSocket, etc):
>
> IceTransport.readyState
> IceTransport.onreadystatechange
> DtlsTransport.readyState
> DtlsTransport.onreadystatechange
>
> Options C (Matches PeerConnection.iceConnectionState):
>
> IceTransport.connectionState
> IceTransport.onconnectionstatechange
> DtlsTransport.connectionState
> DtlsTransport.onconnectionstatechange
>
>
>
> My vote: state > connectionstate > readystate.
>
> What's yours?

My vote is on readyState since it's familiar to developers.

On second place I have the names matching the actual enum type names:

IceTransport.connectionState (type: RTCIceConnectionState)
RTCDtlsTransport.transportState (type: RTCDtlsTransportState)

/Adam
Received on Tuesday, 25 August 2015 08:37:59 UTC

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