v8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
v8::Script Class Reference

#include <v8.h>

Public Member Functions

 V8_DEPRECATE_SOON ("Use maybe version", Local< Value > Run())
 
V8_WARN_UNUSED_RESULT
MaybeLocal< Value
Run (Local< Context > context)
 
Local< UnboundScriptGetUnboundScript ()
 
 V8_DEPRECATED ("Use GetUnboundScript()->GetId()", int GetId())
 

Static Public Member Functions

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

Detailed Description

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

Member Function Documentation

static V8_WARN_UNUSED_RESULT MaybeLocal<Script> v8::Script::Compile ( Local< Context context,
Handle< String source,
ScriptOrigin origin = nullptr 
)
static
Local<UnboundScript> v8::Script::GetUnboundScript ( )

Returns the corresponding context-unbound script.

V8_WARN_UNUSED_RESULT MaybeLocal<Value> v8::Script::Run ( Local< Context context)
static v8::Script::V8_DEPRECATE_SOON ( "Use maybe version"  ,
Local< Script >   CompileHandle< String > source, ScriptOrigin *origin=nullptr 
)
static

A shorthand for ScriptCompiler::Compile().

static Local<Script> v8::Script::V8_DEPRECATE_SOON ( "Use maybe version"  ,
Compile(Handle< String > source, Handle< String > file_name)   
)
static
v8::Script::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()).

v8::Script::V8_DEPRECATED ( "Use GetUnboundScript()->GetId()"  ,
int   GetId() 
)
inline

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