Reputation: 39310
I start my app with firefox.exe --app application.ini -jsconsole
and the first line of my script is:
Components.utils.import("resource://gre/modules/Services.jsm");
The second line is:
alert(typeof services);
And it alerts undefined. Nowhere in the documentation does it say how to get the services only that I need gecko 2.
My firefox version is 21.o for Windows but I think the xulrunner that comes with it might be lacking something.
Upvotes: 0
Views: 55
Reputation: 13649
Any module you import will be named exactly as its filename (excluding extension), so in this case you would've to call it Services
and not services
. Do not forget that JavaScript variables are case-sensitive.
Upvotes: 1