18c339a94Sopenharmony_ci# InstanceWrap<T> 28c339a94Sopenharmony_ci 38c339a94Sopenharmony_ciThis class serves as the base class for [`Napi::ObjectWrap<T>`][] and 48c339a94Sopenharmony_ci[`Napi::Addon<T>`][]. 58c339a94Sopenharmony_ci 68c339a94Sopenharmony_ciIn the case of [`Napi::Addon<T>`][] it provides the 78c339a94Sopenharmony_cimethods for exposing functions to JavaScript on instances of an add-on. 88c339a94Sopenharmony_ci 98c339a94Sopenharmony_ciAs a base class for [`Napi::ObjectWrap<T>`][] it provides the methods for 108c339a94Sopenharmony_ciexposing instance methods of JavaScript objects instantiated from the JavaScript 118c339a94Sopenharmony_ciclass corresponding to the subclass of [`Napi::ObjectWrap<T>`][]. 128c339a94Sopenharmony_ci 138c339a94Sopenharmony_ci## Methods 148c339a94Sopenharmony_ci 158c339a94Sopenharmony_ci### InstanceMethod 168c339a94Sopenharmony_ci 178c339a94Sopenharmony_ciCreates a property descriptor that represents a method exposed on JavaScript 188c339a94Sopenharmony_ciinstances of this class. 198c339a94Sopenharmony_ci 208c339a94Sopenharmony_ci```cpp 218c339a94Sopenharmony_citemplate <typename T> 228c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 238c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceMethod(const char* utf8name, 248c339a94Sopenharmony_ci InstanceVoidMethodCallback method, 258c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 268c339a94Sopenharmony_ci void* data = nullptr); 278c339a94Sopenharmony_ci``` 288c339a94Sopenharmony_ci 298c339a94Sopenharmony_ci- `[in] utf8name`: Null-terminated string that represents the name of the method 308c339a94Sopenharmony_ciprovided by instances of the class. 318c339a94Sopenharmony_ci- `[in] method`: The native function that represents a method provided by the 328c339a94Sopenharmony_ciadd-on. 338c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 348c339a94Sopenharmony_ci`napi_property_attributes`. 358c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the method when it is invoked. 368c339a94Sopenharmony_ci 378c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents a method 388c339a94Sopenharmony_ciprovided by instances of the class. The method must be of the form 398c339a94Sopenharmony_ci 408c339a94Sopenharmony_ci```cpp 418c339a94Sopenharmony_civoid MethodName(const Napi::CallbackInfo& info); 428c339a94Sopenharmony_ci``` 438c339a94Sopenharmony_ci 448c339a94Sopenharmony_ci### InstanceMethod 458c339a94Sopenharmony_ci 468c339a94Sopenharmony_ciCreates a property descriptor that represents a method exposed on JavaScript 478c339a94Sopenharmony_ciinstances of this class. 488c339a94Sopenharmony_ci 498c339a94Sopenharmony_ci```cpp 508c339a94Sopenharmony_citemplate <typename T> 518c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 528c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceMethod(const char* utf8name, 538c339a94Sopenharmony_ci InstanceMethodCallback method, 548c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 558c339a94Sopenharmony_ci void* data = nullptr); 568c339a94Sopenharmony_ci``` 578c339a94Sopenharmony_ci 588c339a94Sopenharmony_ci- `[in] utf8name`: Null-terminated string that represents the name of the method 598c339a94Sopenharmony_ciprovided by instances of the class. 608c339a94Sopenharmony_ci- `[in] method`: The native function that represents a method provided by the 618c339a94Sopenharmony_ciadd-on. 628c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 638c339a94Sopenharmony_ci`napi_property_attributes`. 648c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the method when it is invoked. 658c339a94Sopenharmony_ci 668c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents a method 678c339a94Sopenharmony_ciprovided by instances of the class. The method must be of the form 688c339a94Sopenharmony_ci 698c339a94Sopenharmony_ci```cpp 708c339a94Sopenharmony_ciNapi::Value MethodName(const Napi::CallbackInfo& info); 718c339a94Sopenharmony_ci``` 728c339a94Sopenharmony_ci 738c339a94Sopenharmony_ci### InstanceMethod 748c339a94Sopenharmony_ci 758c339a94Sopenharmony_ciCreates a property descriptor that represents a method exposed on JavaScript 768c339a94Sopenharmony_ciinstances of this class. 778c339a94Sopenharmony_ci 788c339a94Sopenharmony_ci```cpp 798c339a94Sopenharmony_citemplate <typename T> 808c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 818c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceMethod(Napi::Symbol name, 828c339a94Sopenharmony_ci InstanceVoidMethodCallback method, 838c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 848c339a94Sopenharmony_ci void* data = nullptr); 858c339a94Sopenharmony_ci``` 868c339a94Sopenharmony_ci 878c339a94Sopenharmony_ci- `[in] name`: JavaScript symbol that represents the name of the method provided 888c339a94Sopenharmony_ciby instances of the class. 898c339a94Sopenharmony_ci- `[in] method`: The native function that represents a method provided by the 908c339a94Sopenharmony_ciadd-on. 918c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 928c339a94Sopenharmony_ci`napi_property_attributes`. 938c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the method when it is invoked. 948c339a94Sopenharmony_ci 958c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents a method 968c339a94Sopenharmony_ciprovided by instances of the class. The method must be of the form 978c339a94Sopenharmony_ci 988c339a94Sopenharmony_ci```cpp 998c339a94Sopenharmony_civoid MethodName(const Napi::CallbackInfo& info); 1008c339a94Sopenharmony_ci``` 1018c339a94Sopenharmony_ci 1028c339a94Sopenharmony_ci### InstanceMethod 1038c339a94Sopenharmony_ci 1048c339a94Sopenharmony_ciCreates a property descriptor that represents a method exposed on JavaScript 1058c339a94Sopenharmony_ciinstances of this class. 1068c339a94Sopenharmony_ci 1078c339a94Sopenharmony_ci```cpp 1088c339a94Sopenharmony_citemplate <typename T> 1098c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 1108c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceMethod(Napi::Symbol name, 1118c339a94Sopenharmony_ci InstanceMethodCallback method, 1128c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 1138c339a94Sopenharmony_ci void* data = nullptr); 1148c339a94Sopenharmony_ci``` 1158c339a94Sopenharmony_ci 1168c339a94Sopenharmony_ci- `[in] name`: JavaScript symbol that represents the name of the method provided 1178c339a94Sopenharmony_ciby instances of the class. 1188c339a94Sopenharmony_ci- `[in] method`: The native function that represents a method provided by the 1198c339a94Sopenharmony_ciadd-on. 1208c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 1218c339a94Sopenharmony_ci`napi_property_attributes`. 1228c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the method when it is invoked. 1238c339a94Sopenharmony_ci 1248c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents a method 1258c339a94Sopenharmony_ciprovided by instances of the class. The method must be of the form 1268c339a94Sopenharmony_ci 1278c339a94Sopenharmony_ci```cpp 1288c339a94Sopenharmony_ciNapi::Value MethodName(const Napi::CallbackInfo& info); 1298c339a94Sopenharmony_ci``` 1308c339a94Sopenharmony_ci 1318c339a94Sopenharmony_ci### InstanceMethod 1328c339a94Sopenharmony_ci 1338c339a94Sopenharmony_ciCreates a property descriptor that represents a method exposed on JavaScript 1348c339a94Sopenharmony_ciinstances of this class. 1358c339a94Sopenharmony_ci 1368c339a94Sopenharmony_ci```cpp 1378c339a94Sopenharmony_ci<template typename T> 1388c339a94Sopenharmony_citemplate <typename InstanceWrap<T>::InstanceVoidMethodCallback method> 1398c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 1408c339a94Sopenharmony_ciNapi::InstanceWrap::InstanceMethod(const char* utf8name, 1418c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 1428c339a94Sopenharmony_ci void* data = nullptr); 1438c339a94Sopenharmony_ci``` 1448c339a94Sopenharmony_ci 1458c339a94Sopenharmony_ci- `[in] method`: The native function that represents a method provided by the 1468c339a94Sopenharmony_ciadd-on. 1478c339a94Sopenharmony_ci- `[in] utf8name`: Null-terminated string that represents the name of the method 1488c339a94Sopenharmony_ciprovided by instances of the class. 1498c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 1508c339a94Sopenharmony_ci`napi_property_attributes`. 1518c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the method when it is invoked. 1528c339a94Sopenharmony_ci 1538c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents a method 1548c339a94Sopenharmony_ciprovided by instances of the class. The method must be of the form 1558c339a94Sopenharmony_ci 1568c339a94Sopenharmony_ci```cpp 1578c339a94Sopenharmony_civoid MethodName(const Napi::CallbackInfo& info); 1588c339a94Sopenharmony_ci``` 1598c339a94Sopenharmony_ci 1608c339a94Sopenharmony_ci### InstanceMethod 1618c339a94Sopenharmony_ci 1628c339a94Sopenharmony_ciCreates a property descriptor that represents a method exposed on JavaScript 1638c339a94Sopenharmony_ciinstances of this class. 1648c339a94Sopenharmony_ci 1658c339a94Sopenharmony_ci```cpp 1668c339a94Sopenharmony_citemplate <typename T> 1678c339a94Sopenharmony_citemplate <typename InstanceWrap<T>::InstanceMethodCallback method> 1688c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 1698c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceMethod(const char* utf8name, 1708c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 1718c339a94Sopenharmony_ci void* data = nullptr); 1728c339a94Sopenharmony_ci``` 1738c339a94Sopenharmony_ci 1748c339a94Sopenharmony_ci- `[in] method`: The native function that represents a method provided by the 1758c339a94Sopenharmony_ciadd-on. 1768c339a94Sopenharmony_ci- `[in] utf8name`: Null-terminated string that represents the name of the method 1778c339a94Sopenharmony_ciprovided by instances of the class. 1788c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 1798c339a94Sopenharmony_ci`napi_property_attributes`. 1808c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the method when it is invoked. 1818c339a94Sopenharmony_ci 1828c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents a method 1838c339a94Sopenharmony_ciprovided by instances of the class. The method must be of the form 1848c339a94Sopenharmony_ci 1858c339a94Sopenharmony_ci```cpp 1868c339a94Sopenharmony_ciNapi::Value MethodName(const Napi::CallbackInfo& info); 1878c339a94Sopenharmony_ci``` 1888c339a94Sopenharmony_ci 1898c339a94Sopenharmony_ci### InstanceMethod 1908c339a94Sopenharmony_ci 1918c339a94Sopenharmony_ciCreates a property descriptor that represents a method exposed on JavaScript 1928c339a94Sopenharmony_ciinstances of this class. 1938c339a94Sopenharmony_ci 1948c339a94Sopenharmony_ci```cpp 1958c339a94Sopenharmony_citemplate <typename T> 1968c339a94Sopenharmony_citemplate <typename InstanceWrap<T>::InstanceVoidMethodCallback method> 1978c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 1988c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceMethod(Napi::Symbol name, 1998c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 2008c339a94Sopenharmony_ci void* data = nullptr); 2018c339a94Sopenharmony_ci``` 2028c339a94Sopenharmony_ci 2038c339a94Sopenharmony_ci- `[in] method`: The native function that represents a method provided by the 2048c339a94Sopenharmony_ciadd-on. 2058c339a94Sopenharmony_ci- `[in] name`: The `Napi::Symbol` object whose value is used to identify the 2068c339a94Sopenharmony_ciinstance method for the class. 2078c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 2088c339a94Sopenharmony_ci`napi_property_attributes`. 2098c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the method when it is invoked. 2108c339a94Sopenharmony_ci 2118c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents a method 2128c339a94Sopenharmony_ciprovided by instances of the class. The method must be of the form 2138c339a94Sopenharmony_ci 2148c339a94Sopenharmony_ci```cpp 2158c339a94Sopenharmony_civoid MethodName(const Napi::CallbackInfo& info); 2168c339a94Sopenharmony_ci``` 2178c339a94Sopenharmony_ci 2188c339a94Sopenharmony_ci### InstanceMethod 2198c339a94Sopenharmony_ci 2208c339a94Sopenharmony_ciCreates a property descriptor that represents a method exposed on JavaScript 2218c339a94Sopenharmony_ciinstances of this class. 2228c339a94Sopenharmony_ci 2238c339a94Sopenharmony_ci```cpp 2248c339a94Sopenharmony_citemplate <typename T> 2258c339a94Sopenharmony_citemplate <InstanceWrap<T>::InstanceMethodCallback method> 2268c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 2278c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceMethod(Napi::Symbol name, 2288c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 2298c339a94Sopenharmony_ci void* data = nullptr); 2308c339a94Sopenharmony_ci``` 2318c339a94Sopenharmony_ci 2328c339a94Sopenharmony_ci- `[in] method`: The native function that represents a method provided by the 2338c339a94Sopenharmony_ciadd-on. 2348c339a94Sopenharmony_ci- `[in] name`: The `Napi::Symbol` object whose value is used to identify the 2358c339a94Sopenharmony_ciinstance method for the class. 2368c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 2378c339a94Sopenharmony_ci`napi_property_attributes`. 2388c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the method when it is invoked. 2398c339a94Sopenharmony_ci 2408c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents a method 2418c339a94Sopenharmony_ciprovided by instances of the class. The method must be of the form 2428c339a94Sopenharmony_ci 2438c339a94Sopenharmony_ci```cpp 2448c339a94Sopenharmony_ciNapi::Value MethodName(const Napi::CallbackInfo& info); 2458c339a94Sopenharmony_ci``` 2468c339a94Sopenharmony_ci 2478c339a94Sopenharmony_ci### InstanceAccessor 2488c339a94Sopenharmony_ci 2498c339a94Sopenharmony_ciCreates a property descriptor that represents a property exposed on JavaScript 2508c339a94Sopenharmony_ciinstances of this class. 2518c339a94Sopenharmony_ci 2528c339a94Sopenharmony_ci```cpp 2538c339a94Sopenharmony_citemplate <typename T> 2548c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 2558c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceAccessor(const char* utf8name, 2568c339a94Sopenharmony_ci InstanceGetterCallback getter, 2578c339a94Sopenharmony_ci InstanceSetterCallback setter, 2588c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 2598c339a94Sopenharmony_ci void* data = nullptr); 2608c339a94Sopenharmony_ci``` 2618c339a94Sopenharmony_ci 2628c339a94Sopenharmony_ci- `[in] utf8name`: Null-terminated string that represents the name of the method 2638c339a94Sopenharmony_ciprovided by instances of the class. 2648c339a94Sopenharmony_ci- `[in] getter`: The native function to call when a get access to the property 2658c339a94Sopenharmony_ciis performed. 2668c339a94Sopenharmony_ci- `[in] setter`: The native function to call when a set access to the property 2678c339a94Sopenharmony_ciis performed. 2688c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 2698c339a94Sopenharmony_ci`napi_property_attributes`. 2708c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the getter or the setter when it 2718c339a94Sopenharmony_ciis invoked. 2728c339a94Sopenharmony_ci 2738c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents an instance 2748c339a94Sopenharmony_ciaccessor property provided by instances of the class. 2758c339a94Sopenharmony_ci 2768c339a94Sopenharmony_ci### InstanceAccessor 2778c339a94Sopenharmony_ci 2788c339a94Sopenharmony_ciCreates a property descriptor that represents a property exposed on JavaScript 2798c339a94Sopenharmony_ciinstances of this class. 2808c339a94Sopenharmony_ci 2818c339a94Sopenharmony_ci```cpp 2828c339a94Sopenharmony_citemplate <typename T> 2838c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 2848c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceAccessor(Symbol name, 2858c339a94Sopenharmony_ci InstanceGetterCallback getter, 2868c339a94Sopenharmony_ci InstanceSetterCallback setter, 2878c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 2888c339a94Sopenharmony_ci void* data = nullptr); 2898c339a94Sopenharmony_ci``` 2908c339a94Sopenharmony_ci 2918c339a94Sopenharmony_ci- `[in] name`: The `Napi::Symbol` object whose value is used to identify the 2928c339a94Sopenharmony_ciinstance accessor. 2938c339a94Sopenharmony_ci- `[in] getter`: The native function to call when a get access to the property of 2948c339a94Sopenharmony_cia JavaScript class is performed. 2958c339a94Sopenharmony_ci- `[in] setter`: The native function to call when a set access to the property of 2968c339a94Sopenharmony_cia JavaScript class is performed. 2978c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 2988c339a94Sopenharmony_ci`napi_property_attributes`. 2998c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the getter or the setter when it 3008c339a94Sopenharmony_ciis invoked. 3018c339a94Sopenharmony_ci 3028c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents an instance 3038c339a94Sopenharmony_ciaccessor property provided instances of the class. 3048c339a94Sopenharmony_ci 3058c339a94Sopenharmony_ci### InstanceAccessor 3068c339a94Sopenharmony_ci 3078c339a94Sopenharmony_ciCreates a property descriptor that represents a property exposed on JavaScript 3088c339a94Sopenharmony_ciinstances of this class. 3098c339a94Sopenharmony_ci 3108c339a94Sopenharmony_ci```cpp 3118c339a94Sopenharmony_citemplate <typename T> 3128c339a94Sopenharmony_citemplate <typename InstanceWrap<T>::InstanceGetterCallback getter, 3138c339a94Sopenharmony_ci typename InstanceWrap<T>::InstanceSetterCallback setter=nullptr> 3148c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 3158c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceAccessor(const char* utf8name, 3168c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 3178c339a94Sopenharmony_ci void* data = nullptr); 3188c339a94Sopenharmony_ci``` 3198c339a94Sopenharmony_ci 3208c339a94Sopenharmony_ci- `[in] getter`: The native function to call when a get access to the property of 3218c339a94Sopenharmony_cia JavaScript class is performed. 3228c339a94Sopenharmony_ci- `[in] setter`: The native function to call when a set access to the property of 3238c339a94Sopenharmony_cia JavaScript class is performed. 3248c339a94Sopenharmony_ci- `[in] utf8name`: Null-terminated string that represents the name of the method 3258c339a94Sopenharmony_ciprovided by instances of the class. 3268c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 3278c339a94Sopenharmony_ci`napi_property_attributes`. 3288c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the getter or the setter when it 3298c339a94Sopenharmony_ciis invoked. 3308c339a94Sopenharmony_ci 3318c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents an instance 3328c339a94Sopenharmony_ciaccessor property provided by instances of the class. 3338c339a94Sopenharmony_ci 3348c339a94Sopenharmony_ci### InstanceAccessor 3358c339a94Sopenharmony_ci 3368c339a94Sopenharmony_ciCreates a property descriptor that represents a property exposed on JavaScript 3378c339a94Sopenharmony_ciinstances of this class. 3388c339a94Sopenharmony_ci 3398c339a94Sopenharmony_ci```cpp 3408c339a94Sopenharmony_citemplate <typename T> 3418c339a94Sopenharmony_citemplate <typename InstanceWrap<T>::InstanceGetterCallback getter, 3428c339a94Sopenharmony_ci typename InstanceWrap<T>::InstanceSetterCallback setter=nullptr> 3438c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 3448c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceAccessor(Symbol name, 3458c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default, 3468c339a94Sopenharmony_ci void* data = nullptr); 3478c339a94Sopenharmony_ci``` 3488c339a94Sopenharmony_ci 3498c339a94Sopenharmony_ci- `[in] getter`: The native function to call when a get access to the property of 3508c339a94Sopenharmony_cia JavaScript class is performed. 3518c339a94Sopenharmony_ci- `[in] setter`: The native function to call when a set access to the property of 3528c339a94Sopenharmony_cia JavaScript class is performed. 3538c339a94Sopenharmony_ci- `[in] name`: The `Napi::Symbol` object whose value is used to identify the 3548c339a94Sopenharmony_ciinstance accessor. 3558c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 3568c339a94Sopenharmony_ci`napi_property_attributes`. 3578c339a94Sopenharmony_ci- `[in] data`: User-provided data passed into the getter or the setter when it 3588c339a94Sopenharmony_ciis invoked. 3598c339a94Sopenharmony_ci 3608c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents an instance 3618c339a94Sopenharmony_ciaccessor property provided by instances of the class. 3628c339a94Sopenharmony_ci 3638c339a94Sopenharmony_ci### InstanceValue 3648c339a94Sopenharmony_ci 3658c339a94Sopenharmony_ciCreates property descriptor that represents a value exposed on JavaScript 3668c339a94Sopenharmony_ciinstances of this class. 3678c339a94Sopenharmony_ci 3688c339a94Sopenharmony_ci```cpp 3698c339a94Sopenharmony_citemplate <typename T> 3708c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 3718c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceValue(const char* utf8name, 3728c339a94Sopenharmony_ci Napi::Value value, 3738c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default); 3748c339a94Sopenharmony_ci``` 3758c339a94Sopenharmony_ci 3768c339a94Sopenharmony_ci- `[in] utf8name`: Null-terminated string that represents the name of the 3778c339a94Sopenharmony_ciproperty. 3788c339a94Sopenharmony_ci- `[in] value`: The value that's retrieved by a get access of the property. 3798c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 3808c339a94Sopenharmony_ci`napi_property_attributes`. 3818c339a94Sopenharmony_ci 3828c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents an instance 3838c339a94Sopenharmony_civalue property of an add-on. 3848c339a94Sopenharmony_ci 3858c339a94Sopenharmony_ci### InstanceValue 3868c339a94Sopenharmony_ci 3878c339a94Sopenharmony_ciCreates property descriptor that represents a value exposed on JavaScript 3888c339a94Sopenharmony_ciinstances of this class. 3898c339a94Sopenharmony_ci 3908c339a94Sopenharmony_ci```cpp 3918c339a94Sopenharmony_citemplate <typename T> 3928c339a94Sopenharmony_cistatic Napi::ClassPropertyDescriptor<T> 3938c339a94Sopenharmony_ciNapi::InstanceWrap<T>::InstanceValue(Symbol name, 3948c339a94Sopenharmony_ci Napi::Value value, 3958c339a94Sopenharmony_ci napi_property_attributes attributes = napi_default); 3968c339a94Sopenharmony_ci``` 3978c339a94Sopenharmony_ci 3988c339a94Sopenharmony_ci- `[in] name`: The `Napi::Symbol` object whose value is used to identify the 3998c339a94Sopenharmony_ciname of the property. 4008c339a94Sopenharmony_ci- `[in] value`: The value that's retrieved by a get access of the property. 4018c339a94Sopenharmony_ci- `[in] attributes`: The attributes associated with the property. One or more of 4028c339a94Sopenharmony_ci`napi_property_attributes`. 4038c339a94Sopenharmony_ci 4048c339a94Sopenharmony_ciReturns a `Napi::ClassPropertyDescriptor<T>` object that represents an instance 4058c339a94Sopenharmony_civalue property of an add-on. 4068c339a94Sopenharmony_ci 4078c339a94Sopenharmony_ci[`Napi::Addon<T>`]: ./addon.md 4088c339a94Sopenharmony_ci[`Napi::ObjectWrap<T>`]: ./object_wrap.md 409