Reserved words aren't allowed as properties (but should be).

12 views
Skip to first unread message

pcxunl...@gmail.com

unread,
Aug 27, 2014, 1:51:26 AM8/27/14
to strati...@googlegroups.com
In previous versions of JavaScript, the following was illegal:

    var o = {}
    o.delete = 5

But from ECMAScript 5 onwards, the above is now legal. But StratifiedJS rejects it with an error.

If compatibility with old browsers is necessary, it shouldn't be hard for the compiler to detect this and automatically rewrite the above code to this:

    var o = {}
    o["delete"] = 5

This should happen automatically with no effort needed from the programmer.
Reply all
Reply to author
Forward
0 new messages