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

New Post: An example to share vb6 script control vs clearscript

$
0
0
The code above initially calls AddHostObject() to create the "TEST1" global property. What you may not realize - most likely because of insufficient documentation on our part - is that AddHostobject() creates a read-only global property. Subsequent reassignment is quietly ignored. This is by design - to prevent script code from clobbering the host's API, and to achieve compatibility with ClearScript's original JScript/VBScript behavior.

On the other hand, properties created via Script can be reassigned normally. Instead of:
V8JS.AddHostObject("TEST1", T1);
please try:
V8JS.Script.TEST1 = T1;
Cheers!

Viewing all articles
Browse latest Browse all 2297

Trending Articles



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