On ES.next features prototype implementations in web browsers

David Bruant david.bruant at labri.fr
Fri Aug 5 07:47:25 PDT 2011


Hi,

We are seeing prototype implementations of ES.next features in browsers,
namely Proxies on SpiderMonkey and V8. The former allows the use of
proxies in HTML <script> tags with type="text/javascript", the latter
apparently allows the use of proxies when running V8 with some flag
(source: latest aminutewithbrendan [1]).

I don't know if there are other ES.next features currently implemented
and available with <script type="text/javascript">, but i think it
should be avoided. IIRC, Harmony is supposed to be proposed as an opt-in
(with a particular @type value is i remember well). Maybe that this
opt-in could be started now. If it isn't, people are going to use
ES.next features with <script type="text/javascript"> which will prevent
to switch back to an opt-in model. Maybe that type="text/es-next" could
be a value dedicated to experimental ECMAScript features before approval.
I'm not entirely sure, but i think that there is already something like
that on Firefox for chrome code (which allows to already use "const"
without having the keyword available to web dev JS, for instance).

I think that all browsers should agree on one type value (or a serie,
like "text/v8-es-next", "text/spider-monkey-es-next"...
"text/*es-next"...) to expose their experimental features without making
them available to web devs which use (implicitely or not)
"text/javascript" on their webpage.

David

[1] http://www.aminutewithbrendan.com/pages/20110805


More information about the es-discuss mailing list