AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database
Entry:     JS_NewContext (Function)
Summary:     Creates a new JavaScript context.
Syntax:
JSContext * JS_NewContext(JSRuntime *rt, size_t stacksize);

     Argument     Type     Description
     *rt     JSRuntime     Pointer to a previously established JS run-time environment with which to associate this context.
                 
     stacksize     size_t     The size, in bytes, of the execution stack space to allocate for the context.
                 
Description:
JS_NewContext creates a new JavaScript context for an executing script or thread. Each script or thread is associated with its own context, and each context must be associated with a specified JSRuntimert. A context specifies a stack size for the script, the amount, in bytes, of private memory to allocate to the execution stack for the script.

Generally you use JS_NewContext to generate a context for each separate script in a HTML page or frame.

If a call to JS_NewContext is successful, it returns a pointer to the new context. Otherwise it returns NULL.


See also:
JS_ContextIterator
JS_DestroyContext

[sh-index] Back to list of manuals