#include <v8.h>
List of all members.
Detailed Description
A compiled JavaScript script.
Member Function Documentation
Compiles the specified script (bound to current context).
- Parameters:
-
| source | Script source code. |
| origin | Script origin, owned by caller, no references are kept when Compile() returns |
| pre_data | Pre-parsing data, as obtained by ScriptData::PreCompile() using pre_data speeds compilation if it's done multiple times. Owned by caller, no references are kept when Compile() returns. |
| script_data | Arbitrary data associated with script. Using this has same effect as calling SetData(), but makes data available earlier (i.e. to compile event handlers). |
- Returns:
- Compiled script object, bound to the context that was active when this function was called. When run it will always use this context.
Compiles the specified script using the specified file name object (typically a string) as the script's origin.
- Parameters:
-
| source | Script source code. |
| file_name | File name to use as script's origin |
| script_data | Arbitrary data associated with script. Using this has same effect as calling SetData(), but makes data available earlier (i.e. to compile event handlers). |
- Returns:
- Compiled script object, bound to the context that was active when this function was called. When run it will always use this context.
Returns the script id value.
Compiles the specified script using the specified file name object (typically a string) as the script's origin.
- Parameters:
-
| source | Script source code. |
| file_name | file name object (typically a string) to be used as the script's origin. |
- Returns:
- Compiled script object (context independent; when run it will use the currently entered context).
Compiles the specified script (context-independent).
- Parameters:
-
| source | Script source code. |
| origin | Script origin, owned by caller, no references are kept when New() returns |
| pre_data | Pre-parsing data, as obtained by ScriptData::PreCompile() using pre_data speeds compilation if it's done multiple times. Owned by caller, no references are kept when New() returns. |
| script_data | Arbitrary data associated with script. Using this has same effect as calling SetData(), but allows data to be available to compile event handlers. |
- Returns:
- Compiled script object (context independent; when run it will use the currently entered context).
Runs the script returning the resulting value. If the script is context independent (created using New) it will be run in the currently entered context. If it is context specific (created using Compile) it will be run in the context in which it was compiled.
Associate an additional data object with the script. This is mainly used with the debugger as this data object is only available through the debugger API.
The documentation for this class was generated from the following file:
- /home/ondras/svn/v8/include/v8.h