Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Is it possible to validate script syntax before executing it?

$
0
0
Thank for answer and HNY to everyone,
I was also interested in JScript compilation facilities....

Just for a better understanding: is it a design choice to prevent syntax checking and script compilation from being called independently from script execution?

The reason of this question is: when executing, I agree that library makes the interpretation, and also syntax checking and compilation. But if execution leads to side effects on host objects, I'd prefer to make a syntax check before exec instead of realizing that script was wrong once several host objects have been changed.

WDYT?

My current workaround is: make a copy of host objects involved and make a "dry run" over them, and releasing after script is over, being execution successful or not.
I am not happy with this solution because if host objects are huge, duplicating them might be overwhelming in terms of memory.

Thanks in advance,
Tomaso

Viewing all articles
Browse latest Browse all 2297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>