v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::ModuleRequest Class Reference

#include <v8-script.h>

Inheritance diagram for v8::ModuleRequest:
Collaboration diagram for v8::ModuleRequest:

Public Member Functions

Local< StringGetSpecifier () const
 
ModuleImportPhase GetPhase () const
 
int GetSourceOffset () const
 
Local< FixedArrayGetImportAttributes () const
 
Local< FixedArrayGetImportAssertions () const
 
- Public Member Functions inherited from v8::Data
bool IsValue () const
 
bool IsModule () const
 
bool IsModuleRequest () const
 
bool IsFixedArray () const
 
bool IsPrivate () const
 
bool IsObjectTemplate () const
 
bool IsFunctionTemplate () const
 
bool IsContext () const
 

Static Public Member Functions

static V8_INLINE ModuleRequestCast (Data *data)
 

Static Private Member Functions

static void CheckCast (Data *obj)
 

Detailed Description

Definition at line 125 of file v8-script.h.

Member Function Documentation

◆ Cast()

ModuleRequest * v8::ModuleRequest::Cast ( Data * data)
static

Definition at line 936 of file v8-script.h.

◆ CheckCast()

void v8::ModuleRequest::CheckCast ( v8::Data * that)
staticprivate

Definition at line 3900 of file api.cc.

Here is the call graph for this function:

◆ GetImportAssertions()

Local< FixedArray > v8::ModuleRequest::GetImportAssertions ( ) const
inline

Definition at line 159 of file v8-script.h.

◆ GetImportAttributes()

Local< FixedArray > v8::ModuleRequest::GetImportAttributes ( ) const

Contains the import attributes for this request in the form: [key1, value1, source_offset1, key2, value2, source_offset2, ...]. The keys and values are of type v8::String, and the source offsets are of type Int32. Use Module::SourceOffsetToLocation to convert the source offsets to Locations with line/column numbers.

All attributes present in the module request will be supplied in this list, regardless of whether they are supported by the host. Per https://tc39.es/proposal-import-attributes/#sec-hostgetsupportedimportattributes, hosts are expected to throw for attributes that they do not support (as opposed to, for example, ignoring them).

Definition at line 2106 of file api.cc.

Here is the call graph for this function:

◆ GetPhase()

ModuleImportPhase v8::ModuleRequest::GetPhase ( ) const

Returns the module import phase for this ModuleRequest.

Definition at line 2097 of file api.cc.

Here is the call graph for this function:

◆ GetSourceOffset()

int v8::ModuleRequest::GetSourceOffset ( ) const

Returns the source code offset of this module request. Use Module::SourceOffsetToLocation to convert this to line/column numbers.

Definition at line 2102 of file api.cc.

Here is the call graph for this function:

◆ GetSpecifier()

Local< String > v8::ModuleRequest::GetSpecifier ( ) const

Returns the module specifier for this ModuleRequest.

Definition at line 2091 of file api.cc.

Here is the call graph for this function:

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