v8  5.5.372 (node 7.10.1)
V8 is Google's open source JavaScript engine
Script Class Reference

#include <v8.h>

Public Member Functions

 V8_DEPRECATE_SOON ("Use maybe version", Local< Value > Run())
 
V8_WARN_UNUSED_RESULT MaybeLocal< ValueRun (Local< Context > context)
 
Local< UnboundScriptGetUnboundScript ()
 

Static Public Member Functions

static V8_DEPRECATE_SOON ("Use maybe version", Local< Script > Compile(Local< String > source, ScriptOrigin *origin=nullptr))
 
static V8_WARN_UNUSED_RESULT MaybeLocal< ScriptCompile (Local< Context > context, Local< String > source, ScriptOrigin *origin=nullptr)
 
static Local< ScriptV8_DEPRECATE_SOON ("Use maybe version", Compile(Local< String > source, Local< String > file_name))
 

Detailed Description

A compiled JavaScript script, tied to a Context which was active when the script was compiled.

Definition at line 1136 of file v8.h.

Member Function Documentation

◆ Compile()

static V8_WARN_UNUSED_RESULT MaybeLocal<Script> Compile ( Local< Context context,
Local< String source,
ScriptOrigin origin = nullptr 
)
static

◆ GetUnboundScript()

Local<UnboundScript> GetUnboundScript ( )

Returns the corresponding context-unbound script.

◆ Run()

◆ V8_DEPRECATE_SOON() [1/3]

static Local<Script> V8_DEPRECATE_SOON ( "Use maybe version"  ,
Compile(Local< String > source, Local< String > file_name)   
)
static

◆ V8_DEPRECATE_SOON() [2/3]

static V8_DEPRECATE_SOON ( "Use maybe version"  ,
Local< Script >   CompileLocal< String > source, ScriptOrigin *origin=nullptr 
)
static

A shorthand for ScriptCompiler::Compile().

◆ V8_DEPRECATE_SOON() [3/3]

V8_DEPRECATE_SOON ( "Use maybe version"  ,
Local< Value >   Run() 
)

Runs the script returning the resulting value. It will be run in the context in which it was created (ScriptCompiler::CompileBound or UnboundScript::BindToCurrentContext()).


The documentation for this class was generated from the following file: