What's new? | Help | Directory | Sign in
Google
jslibs
standalone Javascript development environment with general purpose native libraries.
  
  
  
  
    
Search
for
Updated Feb 27, 2008 by soubok
Labels: doc
jshost  
jshost executable

jshost executable

home > JSLibs > jshost -

Description

jshost ( javascript host ) is a small executable file that run javascript programs. The main features are:

Command line options

Global functions

Global properties

Configuration object

jshost create a global configuration global to provide other modules some useful informations like stdout access and unsafeMode flag.

Remarks

Generated filename extensions are

Modules entry points signature are

"ModuleInit" JSBool (*ModuleInitFunction)(JSContext *, JSObject *)
"ModuleRelease" void (*ModuleReleaseFunction)(JSContext *cx)
"ModuleFree" void (*ModuleFreeFunction)(void)

Exemple (win32)

extern "C" __declspec(dllexport) JSBool ModuleInit(JSContext *cx, JSObject *obj) {

 InitFileClass(cx, obj);
 InitDirectoryClass(cx, obj);
 InitSocketClass(cx, obj);
 InitErrorClass(cx, obj);
 InitGlobal(cx, obj);

 return JS_TRUE;
}

Sign in to add a comment