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
0
votes
1 answer

Will JS engine compile nested functions declaration after code loading?

As we know JavaScript engine actually will compile JavaScript code before it interprets it. So, functions (variables as well) are processed first before any part of our code is executed. It's called "hoisting". I want to understand when js code is…
Martin
  • 201
  • 1
  • 4
0
votes
1 answer

Usage of nashorn javascript enigne along with jdk 1.6

My code is using rhino javascript engine in jdk 1.6/jdk 1.8 (with external rhino jars). Is there anyway I can implement nashorn javascript engine in jdk 1.6?
Madan Thunderfist
  • 193
  • 1
  • 2
  • 14
0
votes
1 answer

Compile JavaScript function into a callable Java object?

Suppose I have come text that defines a valid JavaScript function, like so: function sum(x, y) { return x + y } I want to be able to write Java code which compiles that text into a callable entity such that: My Java code can discover the…
0xbe5077ed
  • 4,565
  • 6
  • 35
  • 77
0
votes
1 answer

WinForms WebBrowser control's JavaScript execution context

I am using the WinForms WebBrowser control in my C# application and I can interact with the JS code on the web page by setting a COM class in the ObjectForScripting property of the control. Is it possible to get the JavaScriptContext object from…
A9S6
  • 6,575
  • 10
  • 50
  • 82
0
votes
1 answer

ScriptEngine - Calling javascript closure from java

I am trying to invoke a javascript closure from Java using ScriptEngine. See below the code snippet. I removed the script engine eval code for brevity.I was able to invoke the function which has a closure but not the closure, any help is…
webjockey
  • 1,647
  • 2
  • 20
  • 28
0
votes
0 answers

How to access the DOM document in javascript after calling the javascript function is called through java?

I am encountering the following exception: javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "document" is not defined. (#21) in at line number 21 After I call the enable download button it calls a…
0
votes
1 answer

How HTML element's attribute event binding\working internally?

I want to know some detailed knowledge about HTML element event mechanism. For example, we are calling javascript method in HTML's event attributes. How this event attributes handling this events internally.
0
votes
1 answer

Chrome - Javascript engine parsing behavior

HTML comments are allowed in Javascript, for older browsers which are not aware of