Is there any future plans about improving the JavaScript Engine?


There’s lots of issue in the current version of the JavaScript Engine, like: the “new” operator can’t work, and the “[]” operator can’t get a index of a String etc.

I really love JUCE, and I used it a lot in my personal project.
But when I trying to use the JavaScript capabilities of JUCE to do some scripting things, I find it really frustrating…

So, is there any plans to improve the JavaScript Engine in the future like 6.0 or something?

Also, I would like to know when and what will be the next release?
Directly to 6.0, or something like 5.4?
After all, it’s been almost five months since the last release, so can you disclose some information about this?



We’ll be releasing a 5.4 later this year, and 6.0 next year.

Haven’t actually got any time allocated for the JS engine, but if you have specific bugs or FRs for it, let us know and it might be something straightforward to add. But it was never intended to be a full-blown standards-compliant engine though, just a subset that’s handy for casual use and which integrates nicely with the rest of juce.


Got it!
Thanks Jules~


If you’re looking for something a bit heavier but not as big as V8, the Microsoft Edge engine Chakra has a library version. It’s pretty fast too.


Yes if you rely on a standard compliant Javascript engine, you need to look elsewhere, however I second Jules argument that the integration with JUCE is so tight that you will definitely benefit from it if you’re already using Identifiers, vars or DynamicObjects for any kind of data processing.

I also found the code of the Javascript interpreter to be exceptionally easy to extend, so adding eg. String []-access are two lines of code at the right place (in this case add the code that returns the given character of the string to ArraySubscript::getResult() in juce_Javascript.cpp).


I’m actually in the midst of extending it right now… just for fun mind you.

I’ll be flying off for intense POC work soon though so I won’t be able to complete my changes soon by any means.


Also, for a quick integration check out duktape as an alternative JS interpreter - it does a pretty decent job and we use it in a few apps that are in production. I know various game devs that use it for hackday projects too.