0

Have to execute scripts using spidermonkey(jagermonkey) javascript engine availalble within XULRunner.The javascript has some dependent Javascript libraries like requriejs/commonjs etc.

RequireJS provides documentation for Rhino/NodeJS javascript runtime environment.The documentation or testcases does not suggest anything about Spidermonkey scripting environment. Is it possible to use requirejs with Spidermonkey?Any pointers on how to go about it ?

I am using the javascript runtime packaged within XULRunner 2.0.

pavel
  • 26,538
  • 10
  • 45
  • 61
Yeshvanthni
  • 207
  • 2
  • 15
  • [r.js](https://github.com/jrburke/r.js/blob/master/README.md) seems to aid use of requirejs in standalone environment like rhino and node. Do we need a separate RequireJS adapter to use require JS in other JS environments like spidermonkey JS runtime? – Yeshvanthni Aug 14 '11 at 03:02

1 Answers1

0

For XULRunner in particular, you can take a look at the Firebug code -- it embeds requirejs with an adapter for running in XUL.

jrburke
  • 6,776
  • 1
  • 32
  • 23
  • I am using the XULRunner available in chromeless SDK.The default chromeless XUL page displays as the browser window. As a chromeless desktop application, I am using the spidermonkey JS environment in xulrunner for some startup scripting activities in browserless mode.The adapter in firebug code seems to be for extensions on Xulrunner(browser mode). Any pointers for browserless spidermonkey environment? – Yeshvanthni Aug 15 '11 at 05:49