4

Anybody has experience with the upcoming IE9 Chakra engine? I am currently considering whether to incorporate the Microsoft's JScript engine through the Window Script Interface or using one of those open source javascript engines (tracemonkey/v8 etc).

The JScript engine is a bit too slow and Chakra looks promising. But I am not sure if it will be accessible the same way as before since Active Scripting should be deprecated.

Anybody get some idea?

Cheeso
  • 180,104
  • 92
  • 446
  • 681
JavaMan
  • 4,494
  • 4
  • 34
  • 62

2 Answers2

2

I'm not aware that ActiveScripting is deprecated - I've seen no statement from Microsoft along those lines.

Microsoft's documentation suggests that IE9's Javascript engine (code-named "chakra") still gets loaded by IActiveScript. Though MS does not document a ProgId or CLSID, there is a CLSID you can use:

{16d51579-a30b-4c8b-a276-0ff4dc41e755}

The C# code to load the Chakra scripting engine looks like this:

    var guid = new System.Guid("{16d51579-a30b-4c8b-a276-0ff4dc41e755}");
    Type engineType = Type.GetTypeFromCLSID(guid, true);
    var engine = Activator.CreateInstance(engineType) as IActiveScript;

In my limited tests in various micro-benchmarks, Chakra is about 2x the speed of JScript v5.8.

See also:
What is the ProgId or CLSID for IE9's Javascript engine (code-named "Chakra")

Community
  • 1
  • 1
Cheeso
  • 180,104
  • 92
  • 446
  • 681
0

You may be interested in checking this out too: JavaScript Runtime Hosting

It's not ActiveScript but it gives you very low level access to Chakra in a very nice new API.

justin.m.chase
  • 11,241
  • 6
  • 42
  • 84