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

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