Just ship https://github.com/NeilFraser/JS-Interpreter and you’re good to go! /s
As a follow-up: Angular actually did this! https://docs.angularjs.org/guide/expression
> AngularJS does not use JavaScript's eval() to evaluate expressions. Instead AngularJS's $parse service processes these expressions.
Re:XMLUI
by cluckindan on Monday July 21, 2025 @07:57AM
(#44634155)
Note that those are the AngularJS aka ”Angular 1” docs.
For Angular as in ”Angular 2” docs, see https://angular.dev/guide/templates/expression-syntax
Re:XMLUI
by cluckindan on Monday July 21, 2025 @01:35AM
(#44632084)
Looks like they actually went this route, but implemented it from scratch.
XMLUI does not execute JavaScript with "eval" or anything that would not comply with CSP. It runs interpreted JavaScript asynchronously in a sandbox and does not allow use of "eval" (and another dozen low-level functions, such as setTimeout).
Re:XMLUI
by cluckindan on Monday July 21, 2025 @01:34AM
(#44632077)
So the project has implemented a custom JavaScript parser and evaluator in TypeScript?
Edit: I don’t see a CSP on the dogfooded homepage so I would assume this is an issue.