diff --git a/harmony/rn_webview/src/main/ets/RNCWebView.ets b/harmony/rn_webview/src/main/ets/RNCWebView.ets index ae79933f0..8a2f6bf01 100644 --- a/harmony/rn_webview/src/main/ets/RNCWebView.ets +++ b/harmony/rn_webview/src/main/ets/RNCWebView.ets @@ -364,7 +364,7 @@ export struct RNCWebView { } let lockIdentifier = this.webViewBaseOperate?.getLockIdentifier() - let webViewTurboModule = this.ctx.rnInstance.getUITurboModule(TM.RNCWebViewModule.NAME) + let webViewTurboModule = this.ctx.rnInstance.getTurboModule(TM.RNCWebViewModule.NAME) this.callLoadTimer = setTimeout(()=>{ Logger.debug(TAG, "call setTimeout") webViewTurboModule.callLoadFunction(lockIdentifier) @@ -402,7 +402,7 @@ export struct RNCWebView { resetIntercept() { Logger.debug(TAG,"resetIntercept") - this.ctx.rnInstance.getUITurboModule(TM.RNCWebViewModule.NAME) + this.ctx.rnInstance.getTurboModule(TM.RNCWebViewModule.NAME) .clearLoadFunction(this.webViewBaseOperate?.getLockIdentifier()) clearTimeout(this.callLoadTimer) this.shouldInterceptLoad = true diff --git a/harmony/rn_webview/src/main/ets/RNCWebViewPackage.ts b/harmony/rn_webview/src/main/ets/RNCWebViewPackage.ts index 9a320ead4..6ba521db4 100644 --- a/harmony/rn_webview/src/main/ets/RNCWebViewPackage.ts +++ b/harmony/rn_webview/src/main/ets/RNCWebViewPackage.ts @@ -26,10 +26,10 @@ import type { DescriptorWrapperFactoryByDescriptorType, DescriptorWrapperFactoryByDescriptorTypeCtx, } from '@rnoh/react-native-openharmony/ts'; -import { RNPackage, UITurboModuleFactory, UITurboModule } from '@rnoh/react-native-openharmony/ts'; +import { RNPackage, TurboModulesFactory, TurboModule } from '@rnoh/react-native-openharmony/ts'; import { RNC, TM } from '@rnoh/react-native-openharmony/generated/ts'; import { WebViewTurboModule } from './WebViewTurboModule' -import { UITurboModuleContext } from '@rnoh/react-native-openharmony/src/main/ets/RNOH/RNOHContext'; +import { TurboModuleContext } from '@rnoh/react-native-openharmony/src/main/ets/RNOH/RNOHContext'; export class RNCWebViewPackage extends RNPackage { createDescriptorWrapperFactoryByDescriptorType(ctx: DescriptorWrapperFactoryByDescriptorTypeCtx): DescriptorWrapperFactoryByDescriptorType { @@ -38,13 +38,13 @@ export class RNCWebViewPackage extends RNPackage { } } - createUITurboModuleFactory(ctx: UITurboModuleContext): UITurboModuleFactory { + createTurboModulesFactory(ctx: TurboModuleContext): TurboModulesFactory { return new WebViewTurboModulesFactory(ctx); } } -class WebViewTurboModulesFactory extends UITurboModuleFactory { - createTurboModule(name: string): UITurboModule | null { +class WebViewTurboModulesFactory extends TurboModulesFactory { + createTurboModule(name: string): TurboModule | null { if (name === TM.RNCWebViewModule.NAME) { return new WebViewTurboModule(this.ctx); } diff --git a/harmony/rn_webview/src/main/ets/WebViewTurboModule.ts b/harmony/rn_webview/src/main/ets/WebViewTurboModule.ts index 043fd00f0..6c17d397c 100644 --- a/harmony/rn_webview/src/main/ets/WebViewTurboModule.ts +++ b/harmony/rn_webview/src/main/ets/WebViewTurboModule.ts @@ -1,10 +1,10 @@ -import { UITurboModule } from '@rnoh/react-native-openharmony/ts'; +import { TurboModule } from '@rnoh/react-native-openharmony/ts'; import { TM } from '@rnoh/react-native-openharmony/generated/ts'; import Logger from './Logger'; const TAG = "WebViewTurboModule" -export class WebViewTurboModule extends UITurboModule implements TM.RNCWebViewModule.Spec { +export class WebViewTurboModule extends TurboModule implements TM.RNCWebViewModule.Spec { private loadCallbackMap : Map void> = new Map(); isFileUploadSupported(): Promise {