v8
3.11.10 (node 0.8.28)
V8 is Google's open source JavaScript engine
|
#include <v8.h>
Public Member Functions | |
Local< Value > | Run () |
Local< Value > | Id () |
void | SetData (Handle< String > data) |
Static Public Member Functions | |
static Local< Script > | New (Handle< String > source, ScriptOrigin *origin=NULL, ScriptData *pre_data=NULL, Handle< String > script_data=Handle< String >()) |
static Local< Script > | New (Handle< String > source, Handle< Value > file_name) |
static Local< Script > | Compile (Handle< String > source, ScriptOrigin *origin=NULL, ScriptData *pre_data=NULL, Handle< String > script_data=Handle< String >()) |
static Local< Script > | Compile (Handle< String > source, Handle< Value > file_name, Handle< String > script_data=Handle< String >()) |
|
static |
Compiles the specified script using the specified file name object (typically a string) as the script's origin.
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). |
|
static |
Compiles the specified script (bound to current context).
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). |
Compiles the specified script using the specified file name object (typically a string) as the script's origin.
source | Script source code. |
file_name | file name object (typically a string) to be used as the script's origin. |
|
static |
Compiles the specified script (context-independent).
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. |
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.