| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 45816c5 commit c44df51
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1183,6 +1183,10 @@ This macro includes `NAPI_MODULE`, and declares an `Init` function with a | |||
| 1183 | 1183 | special name and with visibility beyond the addon. This will allow Node.js to | |
| 1184 | 1184 | initialize the module even if it is loaded multiple times. | |
| 1185 | 1185 | ||
| 1186 | + There are a few design considerations when declaring a module that may be loaded | ||
| 1187 | + multiple times. The documentation of [context-aware addons][] provides more | ||
| 1188 | + details. | ||
| 1189 | + | ||
| 1186 | 1190 | The variables `env` and `exports` will be available inside the function body | |
| 1187 | 1191 | following the macro invocation. | |
| 1188 | 1192 | ||
@@ -4581,3 +4585,4 @@ This API may only be called from the main thread. | |||
| 4581 | 4585 | [`process.release`]: process.html#process_process_release | |
| 4582 | 4586 | [`init` hooks]: async_hooks.html#async_hooks_init_asyncid_type_triggerasyncid_resource | |
| 4583 | 4587 | [async_hooks `type`]: async_hooks.html#async_hooks_type | |
| 4588 | + [context-aware addons]: addons.html#addons_context_aware_addons | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments