Questions tagged [jint]

Jint is a JavaScript interpreter for .NET.

Jint is a script engine based on the JavaScript language. Using Jint, developers can provide fully scriptable applications, execute .NET code without compiling, or create external configuration logic, using the most used script language.

Jint aims at providing every JavaScript functionalities to .NET applications, and bindings to .NET languages can be done in both sides. Jint scripts can use any .NET object from your application, and use every part of the .NET base class library.

Jint has been rewritten completely and is now hosted on Github.

Jint Information (codeplex archive)

104 questions
0
votes
0 answers

How to import jquery in JINT

using Jint; namespace DaumMailPoster { class CJSInterpretor { Engine m_Engine = new Engine();//jint engine string Daum; string JQuery; public CJSInterpretor() { Daum =…
Dream811
  • 21
  • 5
0
votes
0 answers

How to evaluate datetime expression in JSON File?

I have Json File like below: { "Country": "QAT", "Rules": "if(BO.SenderCountryId == 'QAT' && BO.SenderIdExpiryDate < DateTime.Today.AddDays(-90)){true}", "ErrorKey":…
0
votes
0 answers

Jint.Parser.JavaScriptParser: Distinguishing top-level identifiers

I am trying to detect all global variables referenced by a JavaScript code snippet using Jint.Parser.JavaScriptParser. I'm doing this by following the code example from this issue to retrieve a list of tokens and then removing the names of any…
Dan
  • 861
  • 10
  • 23
0
votes
0 answers

C# - Jint Generic Methods

I am new to using Jint (the Javascript Interpreter for .NET) and am trying to gain a better understanding of the complete functionality. Looking at the documentation, I see support of Generic types like so: jint> var ListOfString =…
0
votes
1 answer

Is there a way to switch environments while using Jint.NET?

I'm currently using the Jint.NET JavaScript console engine for C#, and I'm attempting to emulate separate JavaScript environments that the user can switch between. However, I don't want to create an entirely new console engine for each JavaScript…
Larry Tang
  • 602
  • 5
  • 19
0
votes
2 answers

Convert std:set into jintArray

I'm provided a std::set object that I need to convert/copy into a jintArray to return to an Android app. I tried the code below, but it seems to be crashing my app with only this as a clue: Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR),…
Darthg8r
  • 10,869
  • 12
  • 54
  • 86
0
votes
0 answers

JINT convert Dictionary to JSON string

I'm using PowerUI and Unity (+Jint built in to powerUI) to attempt to read JSON data coming in from the JavaScript code side, on the C# side. For example, I have some JavaScript code (coming into Unity as a simple string): var a =…
bluejayke
  • 2,773
  • 2
  • 20
  • 50
0
votes
0 answers

Is there a way to select a task that is not currently running from a list of tasks?

I have some code currently that is calling a method on an object in excess of 1,000,000 times. This code section currently takes about 2minutes to run. This method also has a lock within it that contains the long running piece of code so simple…
Tristan Trainer
  • 2,116
  • 1
  • 8
  • 30
0
votes
0 answers

Is there a way in Jint to store a function to a Func?

I am using Jint to dynamically run functions for my C# code. It works perfectly for running the functions. However the execution time is linear per execution var engine = new Jint.Engine(); var rule = File.ReadAllText("file.js"); for (int i = 0; i <…
Tristan Trainer
  • 2,116
  • 1
  • 8
  • 30
0
votes
1 answer

How do I print complete element arrays in Jint - like you can with Javascript?

I'm trying to access a Javascript array through Jint. We're basically accepting custom javascript code in an application that works across a variety of platforms and are using Jint for .NET. We need the result to be the same - whether it's in .NET…
0
votes
1 answer

Jint "unexpected reserved word"

I am using the Jint interpreter for C# Jint I want to run the following JavaScript code. class User { constructor(name) { this.name = name; } sayHi() { alert(this.name); } } ... But I always get an exception "unexpected reserver word in line…
Aravor
  • 97
  • 1
  • 6
0
votes
1 answer

execute exe file using Jint - Javascript Interpreter

i have a created one console application and in that i had use Jint - JavaScript Interpreter to run javascript function . but when i use activexobject in javascript it give me a error the code is: string script= @" function…
Suresh Chaudhary
  • 1,541
  • 4
  • 24
  • 38
0
votes
1 answer

Reading JSON objects from javascript file using JINT

I've been supplied with a javascript file containing two JSON objects such as this. var languages = {"Languages":["English","Cymraeg","Deutsch"]}; var labels = [{"$JOB":["Job","Orchwyl","Auftrag",]},{"$JOB_NO":["Job…
mister_b
  • 147
  • 2
  • 9
0
votes
1 answer

How can I use underscore functions in Jint

I'm using Jint for executing javascript in my c# project and I need to access functions like map, filter, reduce etc on an Array. From what I've been able to find here, the native array functions are not available in Jint, but, underscore.js is…
Andrew
  • 259
  • 1
  • 2
  • 9
0
votes
1 answer

JINT-How to catch exception in CatchClrExceptions in JINT?

I want to catch the clr exceptions thrown from javascript. Below things i have tried. var registerScript = new Engine(c => c.AllowClr(typeof(Manager).Assembly ).CatchClrExceptions(ExceptionHandler(new Exception("Exception"))…
Sulthan
  • 184
  • 12