Lines Matching refs:scope

9scope and use **napi_close_handle_scope** to close it. By creating a **napi_value** in a scope, yo…
17 - Scope: used to ensure that the objects created within a certain scope remain active and are prope…
19 - Escapable scope: used to return the values created within the **escapable_handle_scope** to a par…
29 …i_open_handle_scope | Opens a scope.<br/>When processing ArkTS objects with Node-API, you need to …
30 | napi_close_handle_scope | Closes a scope. |
31 | napi_open_escapable_handle_scope | Opens a scope from which one object can be prompted to the out…
32 | napi_close_escapable_handle_scope | Closes an escapable handle scope. |
33 …| Promotes the handle to an ArkTS object so that it is valid for the lifetime of its parent scope.|
47 Use **napi_open_handle_scope** to open a scope, and use **napi_close_handle_scope** to close it. Yo…
60 // Call napi_open_handle_scope to open a scope.
61 napi_handle_scope scope;
62 napi_open_handle_scope(env, &scope);
63 // Create an object within the scope.
70 // Obtain the object property in the scope and return it.
73 // Close the scope. Then, the object handle created within the scope is automatically released.
74 napi_close_handle_scope(env, scope);
81 // Call napi_open_handle_scope to open a scope.
82 napi_handle_scope scope;
83 napi_open_handle_scope(env, &scope);
84 // Create an object within the scope.
91 // Close the scope. Then, the object handle created within the scope is automatically released.
92 napi_close_handle_scope(env, scope);
93 …// Obtain and return the object property outside the scope. In this example, "undefined" is obtain…
123 …dle_scope** to open an escapable scope, which allows the declared values in the scope to be return…
125 … promote the lifecycle of an ArkTS object so that it is valid for the lifetime of the parent scope.
127 …pful for managing ArkTS objects more flexibly in C/C++, especially when passing cross-scope values.
136 // Create an escapable scope.
137 napi_escapable_handle_scope scope;
138 napi_open_escapable_handle_scope(env, &scope);
139 // Create an object within the escapable scope.
146 …pe_handle to promote the ArkTS object handle to make it valid with the lifetime of the outer scope.
148 napi_escape_handle(env, scope, obj, &escapedObj);
149 // Close the escapable scope to clear resources.
150 napi_close_escapable_handle_scope(env, scope);
151 …// Obtain and return the property of the object whose scope is promoted. You can also obtain napi_…