A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/JavascriptNet/Javascript.Net below:

JavascriptNet/Javascript.Net: .Net bindings to the V8 JavaScript engine

// Initialize a context
using (JavascriptContext context = new JavascriptContext()) {

    // Setting external parameters for the context
    context.SetParameter("console", new SystemConsole());
    context.SetParameter("message", "Hello World !");
    context.SetParameter("number", 1);

    // Script
    string script = @"
        var i;
        for (i = 0; i < 5; i++)
            console.Print(message + ' (' + i + ')');
        number += i;
    ";

    // Running the script
    context.Run(script);

    // Getting a parameter
    Console.WriteLine("number: " + context.GetParameter("number"));
}

See our wiki for more information.

Old versions have been published as Noesis.JavaScript.

Publishing a newer version is a work in progress.

Noesis.Javascript.dll needs the Microsoft C Runtime Libraries.

If you don't include the correct version of the runtime libraries when you redistribute Noesis.Javascript.dll then you will get errors when loading the DLL on some users machines. (Many, but not all users will already have it.)

Targets: .NET Framework 4.5

Open the .sln file in Visual Studio, use Configuration Manager to switch to platform to x64, and build. I've been working using Visual Studio 2017, but 2015 will probably work too.

The following warnings are expected:

Also note that when using the DLL built from source, you will need to add a Post Build Step to your consuming project, which copies the v8 DLLs and .bin files into your output directory. See Noesis.Javascript.Tests.csproj for an example, noting that it has some extra sections manually inserted to define V8Platform.

The log at https://docs.google.com/a/g7.org/document/d/1g8JFi8T_oAE_7uAri7Njtig7fKaPDfotU6huOa1alds/edit may help, if it is still being updated.

The unit tests are standard Visual Studio - run them using the GUI.

Simple values and arrays are copied between the native memory space (where v8 resides) and the Common Language Runtime (CLR) (where .Net applications live). Complex .Net types (delegates, objects) are proxied. When calls are made into proxied types then the parameters are copied into the CLR and the call is executed. The results are copied back.

??? buildv8.bat turns off internationalization when invoking gyp to avoid the need to distribute the (large) ICU DLLs and data file.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4