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

New Post: implement uneval function

0
0
Hi furesoft,

You can use DynamicObject.GetDynamicMemberNames() to enumerate the properties of a script object.

However, you'll have to invoke script functions to retrieve various information such as function source code, whether an object is a function, whether one object is the same as another (for cycle detection), etc. A full uneval() implementation without the script engine's help may not be possible.

Consider also that script invocations are expensive, whereas uneval() can be implemented fully in JavaScript without any hops across the host-script boundary.

Good luck!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images