![]() |
v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
|
#include <v8-template.h>
Private Member Functions | |
Template () | |
Friends | |
class | ObjectTemplate |
class | FunctionTemplate |
The superclass of object and function templates.
Definition at line 50 of file v8-template.h.
|
private |
void v8::Template::Set | ( | Isolate * | isolate, |
const char * | name, | ||
Local< Data > | value, | ||
PropertyAttribute | attributes = None ) |
void v8::Template::SetAccessorProperty | ( | Local< Name > | name, |
v8::Local< FunctionTemplate > | getter = Local<FunctionTemplate>(), | ||
v8::Local< FunctionTemplate > | setter = Local<FunctionTemplate>(), | ||
v8::PropertyAttribute | attribute = None ) |
Sets an "accessor property" on the object template, see https://tc39.es/ecma262/#sec-object-type.
Whenever the property with the given name is accessed on objects created from this ObjectTemplate the getter and setter functions are called.
name | The name of the property for which an accessor is added. |
getter | The callback to invoke when getting the property. |
setter | The callback to invoke when setting the property. |
attribute | The attributes of the property for which an accessor is added. |
Definition at line 983 of file api.cc.
void v8::Template::SetIntrinsicDataProperty | ( | Local< Name > | name, |
Intrinsic | intrinsic, | ||
PropertyAttribute | attribute = None ) |
void v8::Template::SetLazyDataProperty | ( | v8::Local< Name > | name, |
AccessorNameGetterCallback | getter, | ||
v8::Local< Value > | data = Local<Value>(), | ||
PropertyAttribute | attribute = None, | ||
SideEffectType | getter_side_effect_type = SideEffectType::kHasSideEffect, | ||
SideEffectType | setter_side_effect_type = SideEffectType::kHasSideEffect ) |
void v8::Template::SetNativeDataProperty | ( | v8::Local< Name > | name, |
AccessorNameGetterCallback | getter, | ||
AccessorNameSetterCallback | setter = nullptr, | ||
v8::Local< Value > | data = Local<Value>(), | ||
PropertyAttribute | attribute = None, | ||
SideEffectType | getter_side_effect_type = SideEffectType::kHasSideEffect, | ||
SideEffectType | setter_side_effect_type = SideEffectType::kHasSideEffect ) |
Sets a "data property" on the object template, see https://tc39.es/ecma262/#sec-object-type.
Whenever the property with the given name is accessed on objects created from this Template the getter and setter callbacks are called instead of getting and setting the property directly on the JavaScript object. Note that in case a property is written via a "child" object, the setter will not be called according to the JavaScript specification. See https://tc39.es/ecma262/#sec-ordinary-object-internal-methods-and-internal-slots-set-p-v-receiver.
name | The name of the data property for which an accessor is added. |
getter | The callback to invoke when getting the property. |
setter | The callback to invoke when setting the property. |
data | A piece of data that will be passed to the getter and setter callbacks whenever they are invoked. |
attribute | The attributes of the property for which an accessor is added. |
|
friend |
Definition at line 132 of file v8-template.h.
|
friend |
Definition at line 131 of file v8-template.h.