@react-native-ohos/react-native-webview 13.10.5-rc.4 → 13.10.5-rc.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -59,6 +59,7 @@ export const WEB_VIEW = "RNCWebView"
|
|
|
59
59
|
@Sendable
|
|
60
60
|
class WorkerRunnable implements WorkerTaskRunnable<ShouldStartParams> {
|
|
61
61
|
run(rnInstance: AnyThreadRNInstance, params: ShouldStartParams): void {
|
|
62
|
+
params.lockState = ShouldOverrideCallbackState.UNDECIDED
|
|
62
63
|
rnInstance.getTurboModule<WebViewTurboModule>(TM.RNCWebViewModule.NAME).setShouldStartParams(params)
|
|
63
64
|
}
|
|
64
65
|
}
|
|
@@ -56,7 +56,7 @@ export class WebViewTurboModule extends AnyThreadTurboModule implements TM.RNCWe
|
|
|
56
56
|
// 锁状态
|
|
57
57
|
export enum ShouldOverrideCallbackState {
|
|
58
58
|
/**
|
|
59
|
-
*
|
|
59
|
+
* 等待返回状态
|
|
60
60
|
*/
|
|
61
61
|
UNDECIDED,
|
|
62
62
|
/**
|
|
@@ -67,6 +67,10 @@ export enum ShouldOverrideCallbackState {
|
|
|
67
67
|
* 允许加载
|
|
68
68
|
*/
|
|
69
69
|
ALLOW_LOADING,
|
|
70
|
+
/**
|
|
71
|
+
* 允许加载
|
|
72
|
+
*/
|
|
73
|
+
DEFAULT,
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
@Sendable
|
|
@@ -74,5 +78,5 @@ export class ShouldStartParams {
|
|
|
74
78
|
shouldStart: boolean = true
|
|
75
79
|
lockIdentifier: number = -1
|
|
76
80
|
// 对应ShouldOverrideCallbackState
|
|
77
|
-
lockState: number =
|
|
81
|
+
lockState: number = ShouldOverrideCallbackState.DEFAULT
|
|
78
82
|
}
|
package/harmony/rn_webview.har
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
|
10
10
|
],
|
|
11
11
|
"license": "MIT",
|
|
12
|
-
"version": "13.10.5-rc.
|
|
12
|
+
"version": "13.10.5-rc.5",
|
|
13
13
|
"homepage": "https://github.com/react-native-oh-library/react-native-webview#readme",
|
|
14
14
|
"scripts": {
|
|
15
15
|
"macos": "react-native run-macos --scheme WebviewExample --project-path example/macos",
|