-
-
Notifications
You must be signed in to change notification settings - Fork 35
Closed
Description
typedef enum {
napi_default = 0,
napi_read_only = 1 << 0,
napi_dont_enum = 1 << 1,
napi_dont_delete = 1 << 2,
// Used with napi_define_class to distinguish static properties
// from instance properties. Ignored by napi_define_properties.
napi_static_property = 1 << 10,
} napi_property_attributes;
(source)
The ReadOnly, DontEnum, and DontDelete flag names are a legacy from ES3 §8.6.1, and were replaced in ES5 by the modern [[Writable]], [[Enumerable]], [[Configurable]]. I feel we should use the modern names instead of archaic names unfamiliar with most JS programmers today.
A large reason why the older nomenclature survived is V8's v8::PropertyAttribute
-based APIs, but even there more modern alternatives using ES5 names (v8::PropertyDescriptor
) have been developed.
digitalinfinity
Metadata
Metadata
Assignees
Labels
No labels