Forwards-compatible syntax proposal

Nathan de Vries nathan at
Mon May 26 18:21:34 PDT 2008

On Mon, 2008-05-26 at 10:22 -0400, Mike Shaver wrote:
> > The main reason I'm interested in an ES4 script accessing an ES3
> > script (I presume the the reverse is not possible?)
> The reverse is indeed possible.

Is there any reading material you could point me to as to how this would
work? I thought the entire purpose of versioned <script /> tags was to
allow vendors to evaluate one script as ES3 and another as ES4. In that

  <script type="application/javascript">
    var ES3ProtoClass = Class({
      initialize: function() {
        this.es4instance = new ES4Class;
  <script type="application/javascript;version=2">
    class ES4Class() {
      private const es3instance;
      function ES4Class() {
        es3instance = new ES3ProtoClass();

What does "new ES4Class" mean to a user agent that does not yet support
ES4, or one that supports both ES3 & 4, but treats "app/javascript" as

Am I missing something?


Nathan de Vries

More information about the Es4-discuss mailing list