From f9159ea2d994e14180fb02ab562f0119513e67cf Mon Sep 17 00:00:00 2001 From: 8cy <50817549+8cy@users.noreply.github.com> Date: Fri, 3 Apr 2020 02:48:28 -0700 Subject: 2020/04/03, 02:47, V1.2.2 --- node_modules/node-addon-api/doc/callbackinfo.md | 97 ------------------------- 1 file changed, 97 deletions(-) delete mode 100644 node_modules/node-addon-api/doc/callbackinfo.md (limited to 'node_modules/node-addon-api/doc/callbackinfo.md') diff --git a/node_modules/node-addon-api/doc/callbackinfo.md b/node_modules/node-addon-api/doc/callbackinfo.md deleted file mode 100644 index 0bf4e1a..0000000 --- a/node_modules/node-addon-api/doc/callbackinfo.md +++ /dev/null @@ -1,97 +0,0 @@ -# CallbackInfo - -The object representing the components of the JavaScript request being made. - -The `Napi::CallbackInfo` object is usually created and passed by the Node.js runtime or node-addon-api infrastructure. - -The `Napi::CallbackInfo` object contains the arguments passed by the caller. The number of arguments is returned by the `Length` method. Each individual argument can be accessed using the `operator[]` method. - -The `SetData` and `Data` methods are used to set and retrieve the data pointer contained in the `Napi::CallbackInfo` object. - -## Methods - -### Constructor - -```cpp -Napi::CallbackInfo::CallbackInfo(napi_env env, napi_callback_info info); -``` - -- `[in] env`: The `napi_env` environment in which to construct the `Napi::CallbackInfo` object. -- `[in] info`: The `napi_callback_info` data structure from which to construct the `Napi::CallbackInfo` object. - -### Env - -```cpp -Napi::Env Napi::CallbackInfo::Env() const; -``` - -Returns the `Env` object in which the request is being made. - -### NewTarget - -```cpp -Napi::Value Napi::CallbackInfo::NewTarget() const; -``` - -Returns the `new.target` value of the constructor call. If the function that was invoked (and for which the `Napi::NCallbackInfo` was passed) is not a constructor call, a call to `IsEmpty()` on the returned value returns true. - -### IsConstructCall - -```cpp -bool Napi::CallbackInfo::IsConstructCall() const; -``` - -Returns a `bool` indicating if the function that was invoked (and for which the `Napi::CallbackInfo` was passed) is a constructor call. - -### Length - -```cpp -size_t Napi::CallbackInfo::Length() const; -``` - -Returns the number of arguments passed in the `Napi::CallbackInfo` object. - -### operator [] - -```cpp -const Napi::Value operator [](size_t index) const; -``` - -- `[in] index`: The zero-based index of the requested argument. - -Returns a `Napi::Value` object containing the requested argument. - -### This - -```cpp -Napi::Value Napi::CallbackInfo::This() const; -``` - -Returns the JavaScript `this` value for the call - -### Data - -```cpp -void* Napi::CallbackInfo::Data() const; -``` - -Returns the data pointer for the callback. - -### SetData - -```cpp -void Napi::CallbackInfo::SetData(void* data); -``` - -- `[in] data`: The new data pointer to associate with this `Napi::CallbackInfo` object. - -Returns `void`. - -### Not documented here - -```cpp -Napi::CallbackInfo::~CallbackInfo(); -// Disallow copying to prevent multiple free of _dynamicArgs -Napi::CallbackInfo::CallbackInfo(CallbackInfo const &) = delete; -void Napi::CallbackInfo::operator=(CallbackInfo const &) = delete; -``` -- cgit v1.2.3