napi_is_detached_arraybuffer


napi_status napi_is_detached_arraybuffer(napi_env env,
                                         napi_value arraybuffer,
                                         bool* result) 
  • [in] env:调用该 API 时所处的环境。
  • [in] arraybuffer:要检查的 JavaScript ArrayBuffer
  • [out] resultarraybuffer 是否已分离。

如果 API 成功,则返回 napi_ok

【Returns napi_ok if the API succeeded.】

如果 ArrayBuffer 的内部数据为 null,则认为它已被分离。

【The ArrayBuffer is considered detached if its internal data is null.】

此 API 表示调用 ECMAScript 语言规范 部分 isDetachedBuffer 中定义的 ArrayBufferIsDetachedBuffer 操作。

【This API represents the invocation of the ArrayBuffer IsDetachedBuffer operation as defined in Section isDetachedBuffer of the ECMAScript Language Specification.】