Skip to content

Commit cac1ad8

Browse files
committed
Update JavascriptEngine documentation
1 parent 2f5f8d1 commit cac1ad8

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

modules/juce_javascript/javascript/juce_JavascriptEngine.h

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,16 @@ namespace juce
3636
{
3737

3838
/**
39-
A simple javascript interpreter!
40-
41-
It's not fully standards-compliant, and won't be as fast as the fancy JIT-compiled
39+
This class is a wrapper around QuickJS, an ES2023 compliant, embeddable javascript
40+
engine. It may not be as fast as the fancy JIT-compiled
4241
engines that you get in browsers, but this is an extremely compact, low-overhead javascript
43-
interpreter, which is integrated with the juce var and DynamicObject classes. If you need
44-
a few simple bits of scripting in your app, and want to be able to easily let the JS
45-
work with native objects defined as DynamicObject subclasses, then this might do the job.
42+
interpreter, which is integrated with the juce var and DynamicObject classes. It allows you
43+
to easily let the JS work with native objects defined as DynamicObject subclasses.
4644
4745
To use, simply create an instance of this class and call execute() to run your code.
4846
Variables that the script sets can be retrieved with evaluate(), and if you need to provide
4947
native objects for the script to use, you can add them with registerNativeObject().
5048
51-
One caveat: Because the values and objects that the engine works with are DynamicObject
52-
and var objects, they use reference-counting rather than garbage-collection, so if your
53-
script creates complex connections between objects, you run the risk of creating cyclic
54-
dependencies and hence leaking.
55-
5649
@tags{Core}
5750
*/
5851
class JUCE_API JavascriptEngine final

0 commit comments

Comments
 (0)