阿西河

所有教程

公众号
🌙
阿西河前端的公众号

我的收藏

    最近访问  (文章)

      教程列表

      抓包专区
      测试专区

      Node.js N-API napi_property_attributes

      Node.js N-API napi_property_attributes

      typedef enum { napi_default = 0, napi_writable = 1 « 0, napi_enumerable = 1 « 1, napi_configurable = 1 « 2,

      // Used with napi_define_class to distinguish static properties // from instance properties. Ignored by napi_define_properties. napi_static = 1 « 10, } napi_property_attributes; napi_property_attributes are flags used to control the behavior of properties set on a JavaScript object. Other than napi_static they correspond to the attributes listed in Section 6.1.7.1 of the ECMAScript Language Specification. They can be one or more of the following bitflags:

      napi_default - Used to indicate that no explicit attributes are set on the given property. By default, a property is read only, not enumerable and not configurable. napi_writable - Used to indicate that a given property is writable. napi_enumerable - Used to indicate that a given property is enumerable. napi_configurable - Used to indicate that a given property is configurable, as defined in Section 6.1.7.1 of the ECMAScript Language Specification. napi_static - Used to indicate that the property will be defined as a static property on a class as opposed to an instance property, which is the default. This is used only by napi_define_class. It is ignored by napi_define_properties.


      更多内容请参考:Node.js N-API,或者通过 点击对应菜单 进行查看;


      目录
      本文目录
      目录