#include <v8-template.h>
Public Member Functions | |
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 DictionaryTemplate * | Cast (Data *data) |
A template to create dictionary objects at runtime.
|
inlinestatic |
|
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. |
Local< Object > v8::DictionaryTemplate::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. |