Skip to content
napi-bindings

Search

Search pages, projects and the Node-API reference

Browse Node-APIshow

napi_object_seal

functionv8js_native_api.h

This method seals a given object. This prevents new properties from being added to it, as well as marking all existing properties as non-configurable. This is described in Section 19.1.2.20 of the ECMA-262 specification.

napi_status napi_object_seal(napi_env env,
                             napi_value object);
  • [in] env: The environment that the Node-API call is invoked under.
  • [in] object: The object to seal.

Returns napi_ok if the API succeeded.

This method seals a given object. This prevents new properties from being added to it, as well as marking all existing properties as non-configurable. This is described in Section 19.1.2.20 of the ECMA-262 specification.

View in the official Node.js documentation