This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 26062 - fixing the description of the "_readonly" attribute on MediaStreamTrack
Summary: fixing the description of the "_readonly" attribute on MediaStreamTrack
Status: RESOLVED WONTFIX
Alias: None
Product: WebRTC Working Group
Classification: Unclassified
Component: Media Capture and Streams (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: public-media-capture@w3.org
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-11 17:16 UTC by Shijun Sun
Modified: 2014-07-01 09:53 UTC (History)
2 users (show)

See Also:


Attachments

Description Shijun Sun 2014-06-11 17:16:14 UTC
MediaStreamTrack has an attribute in its interface definition called "_readonly" (including the underscore).  However, the description refers to it as simply "readonly".

Re the underscore, we had this explained as being a workaround for the fact that readonly is a reserved word in WebIDL.

With a bit digging: the May-29-2013 version of the GUM spec has the underscore in the description.  It was removed in the July-2013 update.  

It should be added back to make the spec self-consistent.
Comment 1 Shijun Sun 2014-06-11 17:44:10 UTC
An alternative option is to define the attribute as readOnly.  The camelCase definition has been used in other W3C specs, e.g. HTMLInputElement, and HTMLTextAreaElement.
Comment 2 Harald Alvestrand 2014-07-01 09:53:03 UTC
Relevant WebIDL spec: http://www.w3.org/TR/WebIDL/ section 3.1

For all of these constructs, the identifier is the value of the identifier token with any single leading U+005F LOW LINE ("_") character (underscore) removed.

Note
A leading "_" is used to escape an identifier from looking like a reserved word so that, for example, an interface named “interface” can be defined. The leading "_" is dropped to unescape the identifier.

While this is irritating, it's self-consistent.
Closing as "no change needed".