This project has moved and is read-only. For the latest updates, please go here.

Compatibility mode

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. Octal literals and octal escape sequences are supported.
  2. parseInt() parses octal numbers without requiring an explicit radix.
  3. NaN, undefined and Infinity can be modified.
  4. The list of reserved keywords becomes much longer (for example, 'abstract' becomes a keyword).
  5. "this" is converted to an object at the call site of function calls.

Last edited Sep 9, 2010 at 3:43 AM by paulbartrum, version 3


No comments yet.