ClearScript Library

Results 87 comments of ClearScript Library

Hi @fuweichin, ClearScript also supports custom loaders. You shouldn't have to modify any source code. Let's walk through a simple example. Suppose you've installed xpath-analyzer as follows: ``` bat >...

Hi @Glareone, To be honest, we're unfamiliar with the Azure Functions environment. We'll take a closer look, but it could take some time. We're glad you found a workaround. Thanks!

Hi @DavidBal, Host objects in ClearScript currently don't support `Symbol.dispose`; in fact, V8 defines no such symbol. However, a relevant [proposal](https://github.com/tc39/proposal-explicit-resource-management) appears to be in flight, and TypeScript is evidently...

Hi again, Here's a more complete solution: ``` C# dynamic setupFunc = engine.Evaluate(@"( function (obj, host, IDisposable) { Object.defineProperty(Object.getPrototypeOf(obj), Symbol.dispose, { get() { const disposable = host.asType(IDisposable, this); return disposable...

Hi Andrey, This is indeed a new bug. Note that the script is unimportant in this case, as the heap is larger than 640KiB when the `V8ScriptEngine` constructor returns. We...

Hi @dementcore, You can use a [host variable](https://microsoft.github.io/ClearScript/Reference/html/M_Microsoft_ClearScript_HostFunctions_newVar__1.htm) for this purpose. First, you'll need a [`HostFunctions`](https://microsoft.github.io/ClearScript/Reference/html/T_Microsoft_ClearScript_HostFunctions.htm) object: ``` C# engine.AddHostObject("host", new HostFunctions()); ``` Once you have that, you can do...

Please reopen this issue if you have additional thoughts or questions about this topic. Thank you!