-
Notifications
You must be signed in to change notification settings - Fork 124
Compatibility mode
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:
- parseInt() parses octal numbers without requiring an explicit radix.
- NaN, undefined and Infinity can be modified.
- The list of reserved keywords becomes much longer (for example, 'abstract' becomes a keyword).
- "this" is converted to an object at the call site of function calls.