Questions tagged [spidermonkey]

SpiderMonkey is Mozilla's JavaScript and WebAssembly Engine. A highly tailored version of which executes JavaScript & WebAssembly in the Firefox web browser.

SpiderMonkey is Mozilla's JavaScript & WebAssembly Engine. A highly tailored and polished-to-fit version of SpiderMonkey executes JavaScript & WebAssembly in the Firefox web browser. SpiderMonkey is also the first JavaScript engine ever made.

This virtual machine (VM) is implemented in C++, Rust and JavaScript and has support for Just-In-Time (JIT) compilation on several major platforms.

Resources


Related tags

318 questions
0
votes
1 answer

Spidermonkey and getElementsByTagName

I'd like to have getElementsByTagName in a system that supports Spidermonkey. Where could I find source for that function or how can I get that functionality with Spidermonkey?
ipavlic
  • 4,906
  • 10
  • 40
  • 77
0
votes
1 answer

When is a javascript engine (like Spidermonkey) going to build in a library like jquery, mootools, etc.. and how can anyone help this to come about?

We all know the great benefits that js libraries such as jquery and mootools etc. have contributed to web browsers and web development. These libraries are now included in a lot if not most of all websites. So, I was wondering why none of the…
e-motiv
  • 5,795
  • 5
  • 27
  • 28
0
votes
1 answer

SpiderMonkey garbage collector

If SM's GC is a conservative stack scanner, why is the example 3 "bad"? Why is "root as you go" necessary? The GC should scan the stack and observe that str1, str2 are roots, no?
user1367401
  • 1,030
  • 17
  • 26
0
votes
1 answer

How to pass arguments to a script through the SpiderMonkey command-line?

I am using SpiderMonkey 1.8.5 on Debian. I am starting a script through the command-line using js -f I'd like to pass some arguments to my script, but I don't know how to do that. It's supposedto be possible since the documentation tells…
Bernard Rosset
  • 4,523
  • 6
  • 27
  • 29
0
votes
1 answer

Is there something equivalent/similar to PyCapsule in SpiderMonkey?

When embedding Python there is the PyCapsule type to create an object containing a C pointer which cannot be modified from Python code, i.e. it's perfect to pass around stuff that is used only by the C code. Since my application also supports…
ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
0
votes
1 answer

How do I get the value of a JSObject property from C?

In SpiderMonkey, how do I get the value of a property of a JSObject from within my C code? static JSBool JSD_getter(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { jsval js_id; JS_GetProperty(cx, obj, "id", &js_id); //…
0
votes
1 answer

how to test jsengine in firefox with the affiliate js files in firefox source code?

I have built the spidermonkey from source successfully ,all that I am confused is how can I test its performance? Fortunaly, I see many test js files in the /js/src/tests folder in FFsource code, so, can I take adventage of these test files? And…
ifinisheri
  • 41
  • 1
  • 5
0
votes
1 answer

Preventing Garbage Collection in the Spidermonkey Javascript Engine

According the Spidermonkey's User Guide https://developer.mozilla.org/En/SpiderMonkey/JSAPI_User_Guide ... a jsval by itself does not protect its referent from the garbage collector... My understanding of this statement is that if we create a…
JavaMan
  • 4,954
  • 4
  • 41
  • 69
0
votes
1 answer

Get property name by id

I'm using this code to iterate over the properties passed to a native function: JSObject *iter = JS_NewPropertyIterator(cx, jsargs); jsid id; while(JS_NextProperty(cx, iter, &id) && id != JSID_VOID) { jsval vp; …
ThiefMaster
  • 310,957
  • 84
  • 592
  • 636
0
votes
1 answer

Meaning of `get functionname() {...}` within Javascript object

I've been looking over the GNOME shell javascript interface and noticed the following snippet (popupMenu.js for those who are interested) from the prototype of a class: PopupSwitchMenuItem.prototype = { __proto__: PopupBaseMenuItem.prototype, …
mathematical.coffee
  • 55,977
  • 11
  • 154
  • 194
0
votes
1 answer

How to set the default js engine in firefox SpiderMonkeywhile building?

As we all know that there are several JSengines in firefox(like SpiderMonkey, traceMonkey, jaegerMonkey and so on), I am wondering whether we can set the default JSengine SpiderMonkey(which only usr interpreter mode) while we are building FF11.0 or…
Spry Mickael
  • 71
  • 1
  • 1
  • 4
-1
votes
1 answer

Can the delphi-javascript library (js15/spidermonkey) easily be updated to mozilla's latest javascript engine version?

I currently use an old version of the delphi-javascript library in my applications which interfaces js32.dll. But I bumped into an annoying bug. So I wonder if it is hard to update the source of the delphi-javascript spidermonkey library to the…
Roy Damman
  • 11
  • 1
-1
votes
2 answers

Javascript SpiderMonkey SyntaxError: missing : after property id:

I'm using Spider Monkey to make a simple console chess game. However I keep getting the error SyntaxError: missing : after property id: in my enum declaration. SyntaxError: missing : after property id: ChessPiece.js:4:5 var Color =…
0x0byte
  • 109
  • 3
  • 11
-1
votes
1 answer

Automatic semicolon insertion: Alternate casting behavior on NodeJS vs Browser?

I have noticed different behavior in NodeJS vs. Browser while screwing around with automatic semicolon insertion and type casting. Browser: > {}+{} NaN > {}+{}; NaN > ({}+{}) "[object Object][object Object]" > ({}+{}); "[object Object][object…
-1
votes
1 answer

Why to obfuscate a JavaScript code is a bad style?

I know, that in the society of the web-developers to use a minifying process for their JavaScript code representing as a well stuff. But if you want to obfuscate a JavaScript code, such an action will be marked as a bad and silly stuff. So why is it…
Secret
  • 2,627
  • 7
  • 32
  • 46
1 2 3
21
22