Questions tagged [javascript-engine]

For questions related to JavaScript engine development. If you are simply referring to issues with JavaScript code, use the [javascript] tag instead.

171 questions
1
vote
0 answers

How to introduce react context to plain JS

React context solves the problem of injecting dependencies without having to prop drill down the entire tree of components. The problem is not unique to react or components though, on the server you have the same problem. For example, for every…
david_adler
  • 9,690
  • 6
  • 57
  • 97
1
vote
2 answers

Use custom SpiderMonkey build with firefox 5

I am trying to build and use SpiderMonkey I compiled (for my academic research) with firefox 5 on a windows machine, but when I try to run firefox I get "missing JS_InitCTypesClass function in mozjs.dll" error. I downloaded SpiderMonkey code and I…
TCS
  • 5,790
  • 5
  • 54
  • 86
1
vote
1 answer

Macrotasks and microtasks exercise

I have the following question about micro and macro tasks running in Google Chrome. See the next example (The following code was proposed by Jake Archibald): // Let's get hold of those elements var outer = document.querySelector('.outer'); var…
1
vote
1 answer

How do I register a Python DOM object with a javascript engine on initialization?

Context: I'm creating a python application called itbrowz. The ultimate desired outcome of this application is to be a passable modern web browser that can be used directly in iTerm2. For that to happen, I need to integrate an embeddable JavaScript…
1
vote
0 answers

Which declare variable on JavaScript? Engine or Compiler?

When I read YDKJS(You Dont Know JS) book in there getify says "First, Compiler declares a variable (if not previously declared in the current scope)" - but I don't understand how compiler declare a variable? Compiler only turn code to machine code…
Murad Sofiyev
  • 790
  • 1
  • 8
  • 25
1
vote
2 answers

JavaScript - Object definition available before code execution on Safari

Objects and functions which I require only to execute once on a page load are wrapped inside an undefined check for the object. On Chrome on Windows/Linux which I usually use, the code works perfectly i.e. code only executes once. But on Safari on…
Baahubali
  • 163
  • 3
  • 14
1
vote
1 answer

ECMA Support in Rhino Engine

I know that Google's V8 engine supports upto the latest ECMAScript.But what is the latest ECMAScript that is supported by Rhino Engine?
Rithesh S
  • 45
  • 1
  • 9
1
vote
0 answers

ChakraCore.NET JavaScript engine: How to expose C# objects(including properties and variables) to javascript

I am able to access object methods by following samples provided in https://github.com/JohnMasen/ChakraCore.NET but couldn't find a way to bind variables in the object. Is there a way to bind properties and variables? And, is there a better approach…
Suma Chaganti
  • 165
  • 1
  • 9
1
vote
0 answers

Console of the chrome is Javascript Engine?

Console in Google Chrome is a example of Javascript Engine? If not, please tell me what is the most popular example of Javascript Engine. This is not my homework, i'm kinda confused. Thanks a lot.
Queue113
  • 31
  • 3
1
vote
0 answers

Evaluate boolean expressions from arrayList

I generate a truth table from any boolean expression and store it into a 2D array. As a first step, I store my boolean expression in an object arrayList. I count noumbers of variables to deduct numbers of columns(variables) and numbers of…
user7110366
1
vote
0 answers

Nashorn hangs inside thread

While running java's nashorn javascript engine inside a thread and upon the code engine.eval(jscript); the application hangs. Is there something to do with thread safety? How can one run engine.eval inside a thread or callback ?
mluis
  • 213
  • 2
  • 13
1
vote
1 answer

How JavaScript works: inside the V8 engine?

Each Browser has own Engine for JavaScript, so if I want to learn how JavaScript works, I must learn about all the Engines? Do the Engines translate the Code in the same Way?
1
vote
1 answer

Differences between Node.js and Node.js REPL

I'm reading the "You don't know JS" book series and I tried to run the snippet: function foo() { console.log( this.a ); } function doFoo(fn) { // `fn` is just another reference to `foo` fn(); // <-- call-site! } var obj = { a: 2, foo:…
1
vote
1 answer

How to replace tinkerpop imports by janus-graph imports during initialization of gremlin groovy script engine?

I initialize gremlin-script-engine with janus-plugin in this way: GremlinScriptEngineManager engineManager = new DefaultGremlinScriptEngineManager(); engineManager.addPlugin(JanusGraphGremlinPlugin.instance()); engine =…
1
vote
2 answers

ScriptEngine based 'javascript' makes incorrect regex validation (for IP address)

Following regex gives wrong result for ip address validation rvrn though regular expression is correct and gives correct result in node based running of .js code. public static void excuteWithinEngine() throws ScriptException{ // ip address…
murphy
  • 11
  • 2