static/class properties

Boris Zbarsky bzbarsky at MIT.EDU
Thu Sep 19 07:23:25 PDT 2013


On 9/19/13 9:30 AM, Rick Waldron wrote:
> class A {
>    const VALUE = 10;
> }
>
> A decision would have to be made for "const VALUE = 10" here: does it
> mean mean `A.VALUE` and not `var a = new A(); a.VALUE;`?

The current web platform (and hence WebIDL) answer is "both".  So both 
XMLHttpRequest.UNSENT and XMLHttpRequest.prototype.UNSENT exist and have 
the same value.

-Boris


More information about the es-discuss mailing list