Closed iccir closed 8 years ago
The major compatibility issue here is the class
method, which is both an oj base object selector and a js reserved word.
class
is reserved in ES5, but how about ES6?
Still a reserved word, but it's ok: reserved words can be used as property names:
// Legal in ES5+, error in older browsers
var o = { class: "Foo" }; console.log(o.class);
See "Reserved Word Usage" here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar
On 2.0 branch
Right now, oj has workarounds for browsers which don't allow "Reserved words as property names" (see ES5 compatibility table).
This includes: IE8 Safari 5.0 Chrome 6 Opera 10
Going forward, I'd like to officially state that oj generates ES5-compatible code, and drop official support for non-ES5-compatible browsers.