Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
v8::Script Class Reference

#include <v8.h>

Public Member Functions

Local< ValueRun ()
 
MaybeLocal< ValueRun (Local< Context > context)
 
Local< UnboundScriptGetUnboundScript ()
 

Static Public Member Functions

static Local< ScriptCompile (Local< String > source, ScriptOrigin *origin=nullptr)
 
static MaybeLocal< ScriptCompile (Local< Context > context, Local< String > source, ScriptOrigin *origin=nullptr)
 
static Local< ScriptCompile (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.

Member Function Documentation

◆ Compile() [1/3]

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

◆ Compile() [2/3]

static Local< Script > v8::Script::Compile ( Local< String source,
Local< String file_name 
)
static

◆ Compile() [3/3]

static Local< Script > v8::Script::Compile ( Local< String source,
ScriptOrigin origin = nullptr 
)
static

A shorthand for ScriptCompiler::Compile().

Examples
shell.cc.

◆ GetUnboundScript()

Local< UnboundScript > v8::Script::GetUnboundScript ( )

Returns the corresponding context-unbound script.

◆ Run() [1/2]

Local< Value > v8::Script::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()).

◆ Run() [2/2]

MaybeLocal< Value > v8::Script::Run ( Local< Context context)

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