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.

154 questions
192
votes
6 answers

Do browsers parse javascript on every page load?

Do browsers (IE and Firefox) parse linked javascript files every time the page refreshes? They can cache the files, so I'm guessing they won't try to download them each time, but as each page is essentially separate, I expect them to tear down any…
Steve Jones
63
votes
4 answers

Javascript Engines Advantages

I am confused about JavaScript engines right now. I know that V8 was a big deal because it compiled JavaScript to native code. Then I started reading about Mozilla SpiderMonkey, which from what I understand is written in C and can compile…
Jan
  • 639
  • 1
  • 6
  • 3
30
votes
5 answers

Why is new slow?

The benchmark: JsPerf The invariants: var f = function() { }; var g = function() { return this; } The tests: Below in order of expected speed new f; g.call(Object.create(Object.prototype)); new (function() { }) (function() { return this;…
Raynos
  • 156,883
  • 55
  • 337
  • 385
18
votes
7 answers

PHP Headless Browser?

Is there a headless browser library for PHP? Would like something that has a JS engine built into it. FOSS preferred.
StackOverflowNewbie
  • 35,023
  • 98
  • 252
  • 421
18
votes
1 answer

How can I see the source of built-in JavaScript functions?

E.g., alert(), Object(), String(), etc. How would I see the code behind these functions? Would I need to understand the language that an engine, such as V8, is written in and read through that, or is there a simpler solution?
jFasaJr
  • 461
  • 4
  • 15
16
votes
8 answers

Any Javascript Engine for .NET/C#?

I'm looking for an open source javascript engine for .NET. Thanks.
Alon Gubkin
  • 53,054
  • 52
  • 181
  • 282
14
votes
3 answers

Javascript JSON.stringify function is not working

I have tried to convert a JS object into JSON. JSON.stringify({a:1, toJSON: function(){}}) Native JSON stringify is not working as expected. JSON stringify executes toJSON function in JS object internally. I have overwritten native code as…
HILARUDEEN S ALLAUDEEN
  • 1,672
  • 1
  • 17
  • 29
13
votes
3 answers

How can I detect which javascript engine (v8 or JSC) is used at runtime in Android?

Newer versions of Android ( > 2.2) include the v8 javascript engine, while older versions only had JSC. However, according to http://blogs.nitobi.com/joe/2011/01/14/android-your-js-engine-is-not-always-v8/, which javascript engine is used at…
digitalbath
  • 6,160
  • 2
  • 15
  • 15
13
votes
2 answers

How does Object.observe() affect performance?

The Object.observe() JavaScript API allows any piece of code to receive change notifications for all property changes of any JavaScript object. Doesn't this severely affect the code generation and performance optimizations that can be performed by…
usr
  • 162,013
  • 33
  • 219
  • 345
10
votes
1 answer

What is the complexity of retrieval/insertion in JavaScript associative arrays (dynamic object properties) in the major javascript engines?

Take the following code example: var myObject = {}; var i = 100; while (i--) { myObject["foo"+i] = new Foo(i); } console.log(myObject["foo42"].bar()); I have a few questions. What kind of data structure do the major engines (IE, Mozilla,…
9
votes
2 answers

Does IE10 use JScript 10.0

@if (@_jscript_version == 10) document.write("You are using IE10"); According to Wikipedia IE10 will use JScript 10. JScript 10 seems to have a whole bunch of new proprietary extensions to EcmaScript 5. Is the version of the EcmaScript engine…
Raynos
  • 156,883
  • 55
  • 337
  • 385
9
votes
2 answers

Nashorn alternative for Java 11

I am using Nashorn JavaScript Engine in Java 11 which works fine except it will be deprecated soon. I have tried GraalVM which I find quite worse as it takes 13-14 seconds to execute a simple expression (e.g. 2+3). Is there any other alternative…
Sohaib Zafar
  • 113
  • 1
  • 5
9
votes
1 answer

Will a JavaScript environment eventually recover after changing the [[Prototype]] of an object?

So, I've read the MDN disclaimers and warnings, I've read a great answer on the subject, but there's still something I want to know. This question actually came from an answer I gave to another question, here. Let's say I decide to do the dirty…
GregRos
  • 7,418
  • 3
  • 29
  • 54
8
votes
7 answers

Is there a javaScript engine where I can run my code without being forced to use a browser?

Is there any way to write and run a JavaScript code without having a need to run a browser and use its JavaScript engine? Thanks!
pencilCake
  • 45,443
  • 73
  • 211
  • 346
8
votes
1 answer

Full callstack for multiple frames JS on IE8

I need to get a full call stack when an exception occurs in JavaScript on Internet Explorer 8. Function calls may occur between frames whose number is large. Call stack necessary to send logs to the developers. I cannot use a debugger, because the…
1
2 3
10 11