1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Add a breaking changes entry about the QuickJS based JavascriptEngine rewrite

This commit is contained in:
attila 2024-04-26 12:01:31 +02:00
parent 48c5857034
commit 2e36c81f25

View file

@ -231,6 +231,33 @@ evaluation due to timeout or syntax errors are distinctly different situations
and this should be reflected on the value returned.
## Change
The old JavascriptEngine internals have been entirely replaced by a new
implementation wrapping the QuickJS engine.
**Possible Issues**
Code that previously successfully evaluated using JavascriptEngine::evaluate()
or JavascriptEngine::execute(), could now fail due to the rules applied by the
new, much more standards compliant engine. One example is object literals
e.g. { a: 'foo', b: 42, c: {} }. When evaluated this way the new engine will
assume that this is a code block and fail.
**Workaround**
When calling JavascriptEngine::evaluate() or JavascriptEngine::execute() the
code may have to be updated to ensure that it's correct according to the
Javascript language specification and in the context of that evaluation. Object
literals standing on their own for example should be wrapped in parentheses
e.g. ({ a: 'foo', b: 42, c: {} }).
**Rationale**
The new implementation uses a fully featured, performant, standards compliant
Javascript engine, which is a significant upgrade.
## Change
The `WebBrowserComponent::pageAboutToLoad()` function on Android now only