File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,16 @@ The `Napi::AsyncContext` to be destroyed.
4545virtual Napi::AsyncContext::~AsyncContext ();
4646```
4747
48+ ### Env
49+
50+ Requests the environment in which the async context has been initially created.
51+
52+ ``` cpp
53+ Napi::Env Env () const ;
54+ ```
55+
56+ Returns the ` Napi::Env ` environment in which the async context has been created.
57+
4858## Operator
4959
5060``` cpp
Original file line number Diff line number Diff line change @@ -3589,6 +3589,10 @@ inline AsyncContext::operator napi_async_context() const {
35893589 return _context;
35903590}
35913591
3592+ inline Napi::Env AsyncContext::Env () const {
3593+ return Napi::Env (_env);
3594+ }
3595+
35923596// //////////////////////////////////////////////////////////////////////////////
35933597// AsyncWorker class
35943598// //////////////////////////////////////////////////////////////////////////////
Original file line number Diff line number Diff line change @@ -1784,6 +1784,8 @@ namespace Napi {
17841784
17851785 operator napi_async_context () const ;
17861786
1787+ Napi::Env Env () const ;
1788+
17871789 private:
17881790 napi_env _env;
17891791 napi_async_context _context;
You can’t perform that action at this time.
0 commit comments