![]() |
v8 13.6.233 (node 24.1.0)
V8 is Google's open source JavaScript engine
|
#include <v8-template.h>
Public Member Functions | |
V8_WARN_UNUSED_RESULT Local< Object > | NewInstance (Local< Context > context, MemorySpan< MaybeLocal< Value > > property_values) |
Static Public Member Functions | |
static Local< DictionaryTemplate > | New (Isolate *isolate, MemorySpan< const std::string_view > names) |
static V8_INLINE DictionaryTemplate * | Cast (Data *data) |
A template to create dictionary objects at runtime.
Definition at line 1052 of file v8-template.h.
|
static |
Definition at line 1129 of file v8-template.h.
Referenced by NewInstance().
|
static |
Creates a new template. Also declares data properties that can be passed on instantiation of the template. Properties can only be declared on construction and are then immutable. The values are passed on creating the object via NewInstance()
.
names | the keys that can be passed on instantiation. |
V8_WARN_UNUSED_RESULT Local< Object > NewInstance | ( | Local< Context > | context, |
MemorySpan< MaybeLocal< Value > > | property_values ) |
Creates a new instance of this template.
context | The context used to create the dictionary object. |
property_values | Values of properties that were declared using DeclareDataProperties() . The span only passes values and expectes the order to match the declaration. Non-existent properties are signaled via empty MaybeLocal s. |
References Cast(), V8_INLINE, and V8_WARN_UNUSED_RESULT.