diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h index f303a596826c31912d4e3c7e21eea4cf61e4afd4..2dc39225b567cee0f090d0c3f86a4144aa9e3620 100644 --- a/ark_runtime/jsvm/jsvm.h +++ b/ark_runtime/jsvm/jsvm.h @@ -1423,6 +1423,22 @@ JSVM_EXTERN JSVM_Status OH_JSVM_StrictEquals(JSVM_Env env, JSVM_Value rhs, bool* result); +/** + * @brief This API represents the invocation of the Relaxed Equality algorithm. + * Returns true as long as the values are equal, regardless of type. + * + * @param env: The environment that the API is invoked under. + * @param lhs: The JavaScript value to check. + * @param rhs: The JavaScript value to check against. + * @param result: Whether the two JSVM_Value objects are relaxed equal. + * @return Returns JSVM_OK if the API succeeded. + * @since 12 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_Equals(JSVM_Env env, + JSVM_Value lhs, + JSVM_Value rhs, + bool* result); + /** * @brief This API represents the invocation of the ArrayBuffer detach operation. * diff --git a/ark_runtime/jsvm/libjsvm.ndk.json b/ark_runtime/jsvm/libjsvm.ndk.json index 268d2d0106bf274dbccf74a83d3ca0449116db57..3f828a2cbfdefdc4cd770a5071fcfe670f5bfe10 100644 --- a/ark_runtime/jsvm/libjsvm.ndk.json +++ b/ark_runtime/jsvm/libjsvm.ndk.json @@ -570,5 +570,9 @@ { "first_introduced": "12", "name": "OH_JSVM_DefineClassWithPropertyHandler" + }, + { + "first_introduced": "12", + "name": "OH_JSVM_Equals" } ]