You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sets getters and setters for a property with a given name on an `ObjectTemplate` or a plain `Object`. Accepts getters with the `Nan::GetterCallback` signature (see <ahref="#api_nan_getter">Getter declaration</a>) and setters with the `Nan::SetterCallback` signature (see <ahref="#api_nan_setter">Setter declaration</a>).
507
507
508
+
**Note**`v8::AccessControl` was deprectaed in v8 14.2 and subsequently removed. To maintain backward compatibility new enum `enum AccessControl {DEFAULT = 0};` was added. Nan will determine v8 version used and switch to a correct signature.
v8::Local<v8::Value> data = v8::Local<v8::Value>(),
542
+
enum Nan::AccessControl settings = DEFAULT,
543
+
v8::PropertyAttribute attribute = v8::None);
544
+
bool SetAccessor(v8::Local<v8::Object> obj,
545
+
v8::Local<v8::String> name,
546
+
Nan::GetterCallback getter,
547
+
Nan::SetterCallback setter = 0,
548
+
v8::Local<v8::Value> data = v8::Local<v8::Value>(),
549
+
enum Nan::AccessControl settings = DEFAULT,
550
+
v8::PropertyAttribute attribute = v8::None)
534
551
```
535
552
536
553
See the V8 [`ObjectTemplate#SetAccessor()`](https://v8docs.nodesource.com/node-8.16/db/d5f/classv8_1_1_object_template.html#aca0ed196f8a9adb1f68b1aadb6c9cd77) and [`Object#SetAccessor()`](https://v8docs.nodesource.com/node-8.16/db/d85/classv8_1_1_object.html#ae91b3b56b357f285288c89fbddc46d1b) for further information about how to use `Nan::SetAccessor()`.
0 commit comments