<!-- ##### SECTION Title ##### -->
Working with Contexts

<!-- ##### SECTION Short_Description ##### -->
Self-contained JavaScript execution environments

<!-- ##### SECTION Long_Description ##### -->
<para>
A #SeedContext provides a complete "universe" for the execution of JavaScript. You can use seed_context_create() to create a sandboxed context that lacks the import system, so it can be used to execute somewhat untrusted JavaScript (as it has no way to access the rest of your system). You can also expose the default set of globals (including "print", "imports", and "Seed") to create more powerful but still self-contained environments within which to execute code.
</para>

<example>
<title>Using a Seed context as a form of sandboxing</title>
<programlisting>
...
ctx = seed_context_create(NULL, NULL);
script = seed_make_script(ctx, "print(imports)", NULL, 0);
// nothing is printed, because imports is undefined, because we're in a sandbox
...
</programlisting>
</example>

<para>The <link linkend="Sandbox-module">sandbox</link> module provides access to this system from the JavaScript side of Seed.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### SECTION Image ##### -->


<!-- ##### TYPEDEF SeedContext ##### -->
<para>

</para>


<!-- ##### TYPEDEF SeedGlobalContext ##### -->
<para>

</para>


<!-- ##### TYPEDEF SeedContextGroup ##### -->
<para>

</para>


<!-- ##### FUNCTION seed_context_create ##### -->
<para>

</para>

@group: 
@global_class: 
@Returns: 


<!-- ##### FUNCTION seed_context_ref ##### -->
<para>

</para>

@ctx: 
@Returns: 


<!-- ##### FUNCTION seed_context_unref ##### -->
<para>

</para>

@ctx: 


<!-- ##### FUNCTION seed_context_collect ##### -->
<para>

</para>

@ctx: 


<!-- ##### FUNCTION seed_context_get_global_object ##### -->
<para>

</para>

@ctx: 
@Returns: 


<!-- ##### FUNCTION seed_prepare_global_context ##### -->
<para>

</para>

@ctx: 


<!-- ##### FUNCTION seed_importer_add_global ##### -->
<para>

</para>

@ctx: 
@name: 


<!-- ##### FUNCTION seed_importer_set_search_path ##### -->
<para>

</para>

@ctx: 
@search_path: 


