InstanceMember uses napi_default for attributes if nothing else is specified.
napi_default means read only, not enumerable and not configurable.
The corresponding NAN API SetPrototypeMethod calls PrototypeTemplate()->Set() and to my understanding of the v8 API they use PropertyAttribute::None which is defined inverted:
enum PropertyAttribute {
/** None. **/
None = 0,
/** ReadOnly, i.e., not writable. **/
ReadOnly = 1 << 0,
/** DontEnum, i.e., not enumerable. **/
DontEnum = 1 << 1,
/** DontDelete, i.e., not configurable. **/
DontDelete = 1 << 2
};
Is this difference intended? In general non configurable properties are quite uncommon in JS world.
FWIW: If I define a class in javascript members are configureable, writable and not enumerable.