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
2
votes
0 answers

What's the performance penalty in calling Object.setProtoytypeOf() in the following code?

I have been hearing quite a lot that Object.setPrototypeOf() in JavaScript is not a good thing to do. It reduces optimizations and lowers down the performance of an application. Specifically, it reduces some inline caches and fast prototype property…
coderboy
  • 1,710
  • 1
  • 6
  • 16
2
votes
1 answer

why this type of error comes in DevTools failed to load SourceMap

DevTools failed to load SourceMap: Could not load content for http://127.0.0.1:8000/css/bootstrap.min.css.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILUREenter image description here
2
votes
1 answer

Is there a performance cost to using the same query selector again and again?

Does the performance cost of searching for the same query selector within a document add up to a significant one, or does some code in the pipeline -- from the JavaScript library in use (e.g. jquery) or the JavaScript engine or the browser engine --…
Water Cooler v2
  • 32,724
  • 54
  • 166
  • 336
2
votes
1 answer

How to use alternative js/browser engine with htmlunit instead of rhino?

Throughout my experiences with using htmlunit, I have slowly come to realize that htmlunit does not interact well with javascript. The rhino js engine which htmlunit uses is most definitely the root cause of these issues, and I was wondering if it…
2
votes
1 answer

JavaScript Ambiguity between (1) and 1

What is difference between (1) and 1. 1.toString() //Will throw error 1.toFixed(1) //Will throw error (1).toString() // output "1" (1).toFixed(1) // output 1.0
Jagajit Prusty
  • 2,070
  • 2
  • 21
  • 39
2
votes
3 answers

Understanding how the JS engine is looping through to get the index of an array element

I wrote a function to output the names and real-life indexes of people waiting in a line. var line = ["Sarah", "Mike", "Bob"]; function currentLine(line) { if (line.length === 0) { document.write(`The line is currently empty.`); }…
tea
  • 568
  • 2
  • 10
  • 18
2
votes
2 answers

Whether function declaration in Javascript of form `function fx () {}` a LHS or RHS lookup?

I was reading the Scopes and Closure title of You don't know JS by Kyle Simpson, specifically this topic Compiler Speak. This section is about the kind of Lookups the engine uses. Now I understand what is LHS or RHS lookup to the extent given in…
Akshendra Pratap
  • 2,002
  • 1
  • 12
  • 25
2
votes
5 answers

How to detect native browser/engine objects in javascript

I need a function to return true if the given variable name is already defined by javascript engine or browser. For example isNative('window') //true; isNative('Math') //true; isNative('myVar') //false isNative('navigator')…
danial
  • 4,058
  • 2
  • 32
  • 39
2
votes
0 answers

v8::Object::SetAccessor - How does it work?

There's no documentation on "v8::Object::SetAccessor" - is it correct to assume I can set a different setter and getter function for each specified property name? How does this affect the object if it was created from an object template? (yes, I…
James Wilkins
  • 6,836
  • 3
  • 48
  • 73
2
votes
2 answers

the safari javascript engine in webkit

I was recalled that the webkit javascript engine called "JavaScript core" by my friend, however, when i searched around the answer is that safari runs SquirrelFish as its JS engine. My friend told me that it might be an "open source" vs. "non-open…
Sam
  • 4,521
  • 13
  • 46
  • 81
2
votes
1 answer

Javascript engine to parse and run Javascript web page (perl/python)

I have been trying since long to parse and run javascript webpages using python(2.4). Unfortunately I cannot use qt,webkit so most of the python based headless browsers are ruled out. I however recently found out WWW::Scripter in perl(using perl…
Ajay Nair
  • 1,827
  • 3
  • 20
  • 33
2
votes
8 answers

Should I care about JavaScript engine speed when using jQuery?

I'm writing jQuery for a page that is a complex mess of many DOM elements (I have no control over this). The primary target browser is IE7, and I have concerns about the speed of its JavaScript engine. Scripts I've already written are laggy and have…
Alex Angas
  • 59,219
  • 41
  • 137
  • 210
2
votes
2 answers

What happens to the bound event when the DOM element vanishes?

What happens when I bind an event handler to a DOM element and then subsequently destroy the DOM element? Do I have to go through a process of unbinding the event handlers?
Click Me!
Lord Loh.
  • 2,437
  • 7
  • 39
  • 64
1
vote
3 answers

executing javascript code inside Android "java" application

I'm working on an Android app "native written in java" and I'm getting a response from a server the response is a javascript function I need to use this function to do some calculations inside my native java code. any ideas how to do so. sample…
Helal Ismail
  • 518
  • 1
  • 10
  • 22
1
vote
1 answer

Spider monkey : Why JS array is not inheriting default properties like length, splice etc

I am actually new to both spider monkey api and this mailing list. Actually I was trying to create a Array like objectA.arrayA and the call back code goes like this. char *value[] = {"abc", "xyz", "efg"}; int count = 0; JSObject* val =…
Rituparna Kashyap
  • 1,497
  • 13
  • 19