!49062 FrameNode isAttached接口加API版本隔离到14

Merge pull request !49062 from 马梓健/add_api_version_control_for_FrameNode_isAttached
This commit is contained in:
openharmony_ci 2024-11-21 14:57:15 +00:00 committed by Gitee
commit 688fcf2486
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1288,7 +1288,12 @@ ArkUINativeModuleValue FrameNodeBridge::IsAttached(ArkUIRuntimeCallInfo* runtime
Local<JSValueRef> firstArg = runtimeCallInfo->GetCallArgRef(0);
CHECK_NULL_RETURN(!firstArg.IsNull(), panda::BooleanRef::New(vm, false));
auto nativeNode = nodePtr(firstArg->ToNativePointer(vm)->Value());
auto isAttached = GetArkUINodeModifiers()->getFrameNodeModifier()->isVisible(nativeNode);
bool isAttached;
if (AceApplicationInfo::GetInstance().GreatOrEqualTargetAPIVersion(PlatformVersion::VERSION_FOURTEEN)) {
isAttached = GetArkUINodeModifiers()->getFrameNodeModifier()->isAttached(nativeNode);
} else {
isAttached = GetArkUINodeModifiers()->getFrameNodeModifier()->isVisible(nativeNode);
}
return panda::BooleanRef::New(vm, isAttached);
}
ArkUINativeModuleValue FrameNodeBridge::GetInspectorInfo(ArkUIRuntimeCallInfo* runtimeCallInfo)