V8 API Reference, 7.2.502.16 (for Deno 0.2.4)
v8::Script Class Reference

#include <v8.h>

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

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

Definition at line 1225 of file v8.h.

Member Function Documentation

◆ Compile()

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

A shorthand for ScriptCompiler::Compile().

Definition at line 2608 of file api.cc.

◆ GetUnboundScript()

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

Returns the corresponding context-unbound script.

Definition at line 2144 of file api.cc.

◆ Run()

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

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

Definition at line 2108 of file api.cc.


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