Skip to content
paulbartrum edited this page Dec 14, 2015 · 3 revisions

The ScriptEngine class has a CompatibilityMode flag which can be used to revert some behaviours to that of ECMAScript 3.

var engine = new Jurassic.ScriptEngine();
engine.CompatibilityMode = Jurassic.CompatibilityMode.ECMAScript3;

Setting this flag has the following effects:

  1. parseInt() parses octal numbers without requiring an explicit radix.
  2. NaN, undefined and Infinity can be modified.
  3. The list of reserved keywords becomes much longer (for example, 'abstract' becomes a keyword).
  4. "this" is converted to an object at the call site of function calls.