mirror of
https://github.com/musix-org/musix-oss
synced 2025-11-03 05:51:35 +00:00
1.3 KiB
1.3 KiB
Env
The opaque data structure containing the environment in which the request is being run.
The Env object is usually created and passed by the Node.js runtime or node-addon-api infrastructure.
Methods
Constructor
Napi::Env::Env(napi_env env);
[in] env: Thenapi_envenvironment from which to construct theNapi::Envobject.
napi_env
operator napi_env() const;
Returns the napi_env opaque data structure representing the environment.
Global
Napi::Object Napi::Env::Global() const;
Returns the Napi::Object representing the environment's JavaScript Global Object.
Undefined
Napi::Value Napi::Env::Undefined() const;
Returns the Napi::Value representing the environment's JavaScript Undefined Object.
Null
Napi::Value Napi::Env::Null() const;
Returns the Napi::Value representing the environment's JavaScript Null Object.
IsExceptionPending
bool Napi::Env::IsExceptionPending() const;
Returns a bool indicating if an exception is pending in the environment.
GetAndClearPendingException
Napi::Error Napi::Env::GetAndClearPendingException();
Returns an Napi::Error object representing the environment's pending exception, if any.