Closed hamidjalili59 closed 9 months ago
This is not something I plan to implement for a couple of reasons:
It would either require modifying the js compiler, or use something like the 'eval' function in js, which is neither efficient nor secure. The recommended way here is to use js interop as described here: https://dart.dev/web/js-interop
And if you still want something like you showed, you can wrap the 'eval()' function yourself in just a couple of lines.
Imagine using an tag to implement a button, but in addition to using Dart code inside this tag, you want to use JavaScript code in the event of this button. This can be achieved by using a method like Styles.raw(). for example: JasprJS.raw(() { console.log("in Jaspr"); }).
For some libraries and features not found in Dart, you can leverage this feature.