@react-native-ohos/react-native-webview 13.16.2-beta.2 → 13.16.2

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.
Files changed (80) hide show
  1. package/CHANGELOG.md +128 -0
  2. package/LICENSE +20 -20
  3. package/README.OpenSource +10 -10
  4. package/README.md +469 -13
  5. package/harmony/rn_webview/.gitignore +6 -0
  6. package/harmony/rn_webview/BuildProfile.ets +17 -0
  7. package/harmony/rn_webview/OAT.xml +44 -44
  8. package/harmony/rn_webview/build-profile.json5 +28 -28
  9. package/harmony/rn_webview/index.ets +12 -12
  10. package/harmony/rn_webview/oh-package-lock.json5 +29 -0
  11. package/harmony/rn_webview/oh-package.json5 +13 -13
  12. package/harmony/rn_webview/src/main/cpp/CMakeLists.txt +9 -9
  13. package/harmony/rn_webview/src/main/cpp/WebViewPackage.h +16 -16
  14. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/BaseReactNativeWebviewPackage.h +96 -96
  15. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/components/RNCWebViewJSIBinder.h +121 -120
  16. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebView.cpp +18 -18
  17. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebView.h +16 -16
  18. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebViewModule.cpp +17 -17
  19. package/harmony/rn_webview/src/main/cpp/generated/RNOH/generated/turbo_modules/RNCWebViewModule.h +16 -16
  20. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ComponentDescriptors.h +24 -24
  21. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.cpp +258 -258
  22. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/EventEmitters.h +277 -277
  23. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.cpp +104 -103
  24. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/Props.h +510 -509
  25. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ShadowNodes.cpp +17 -17
  26. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/ShadowNodes.h +32 -32
  27. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/States.cpp +16 -16
  28. package/harmony/rn_webview/src/main/cpp/generated/react/renderer/components/react_native_webview/States.h +28 -28
  29. package/harmony/rn_webview/src/main/ets/Logger.ts +43 -43
  30. package/harmony/rn_webview/src/main/ets/Magic.ets +201 -198
  31. package/harmony/rn_webview/src/main/ets/RNCWebView.ets +1019 -818
  32. package/harmony/rn_webview/src/main/ets/RNCWebViewPackage.ets +37 -37
  33. package/harmony/rn_webview/src/main/ets/WebViewBaseOperate.ets +528 -514
  34. package/harmony/rn_webview/src/main/ets/WebViewTurboModule.ets +67 -63
  35. package/harmony/rn_webview/src/main/ets/generated/components/RNCWebView.ts +529 -525
  36. package/harmony/rn_webview/src/main/ets/generated/components/ts.ts +5 -5
  37. package/harmony/rn_webview/src/main/ets/generated/index.ets +5 -5
  38. package/harmony/rn_webview/src/main/ets/generated/ts.ts +6 -6
  39. package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebView.ts +18 -18
  40. package/harmony/rn_webview/src/main/ets/generated/turboModules/RNCWebViewModule.ts +16 -16
  41. package/harmony/rn_webview/src/main/ets/generated/turboModules/ts.ts +6 -6
  42. package/harmony/rn_webview/src/main/module.json5 +10 -10
  43. package/harmony/rn_webview/src/main/resources/base/element/string.json +39 -39
  44. package/harmony/rn_webview/src/main/resources/en_US/element/string.json +39 -39
  45. package/harmony/rn_webview/src/main/resources/zh_CN/element/string.json +39 -39
  46. package/harmony/rn_webview/src/test/List.test.ets +4 -4
  47. package/harmony/rn_webview/src/test/LocalUnit.test.ets +32 -32
  48. package/harmony/rn_webview/ts.ets +8 -8
  49. package/harmony/rn_webview.har +0 -0
  50. package/lib/NativeRNCWebView.d.ts +10 -0
  51. package/lib/NativeRNCWebView.d.ts.map +1 -0
  52. package/lib/NativeRNCWebView.js +1 -0
  53. package/lib/NativeRNCWebViewModule.d.ts +9 -0
  54. package/lib/NativeRNCWebViewModule.d.ts.map +1 -0
  55. package/lib/NativeRNCWebViewModule.js +1 -0
  56. package/lib/RNCWebViewNativeComponent.d.ts +250 -0
  57. package/lib/RNCWebViewNativeComponent.d.ts.map +1 -0
  58. package/lib/RNCWebViewNativeComponent.js +1 -0
  59. package/lib/WebView.d.ts +4 -0
  60. package/lib/WebView.d.ts.map +1 -0
  61. package/lib/WebView.harmony.d.ts +16 -0
  62. package/lib/WebView.harmony.d.ts.map +1 -0
  63. package/lib/WebView.harmony.js +1 -0
  64. package/lib/WebView.js +1 -0
  65. package/lib/codegenUtils.d.ts +3 -0
  66. package/lib/codegenUtils.d.ts.map +1 -0
  67. package/lib/codegenUtils.js +0 -0
  68. package/lib/index.d.ts +4 -0
  69. package/lib/index.d.ts.map +1 -0
  70. package/lib/index.js +1 -0
  71. package/package.json +101 -101
  72. package/src/NativeRNCWebView.ts +21 -21
  73. package/src/NativeRNCWebViewModule.ts +19 -19
  74. package/src/RNCWebViewNativeComponent.ts +356 -355
  75. package/src/WebView.harmony.tsx +348 -346
  76. package/src/WebView.tsx +10 -10
  77. package/src/codegenUtils.ts +10 -10
  78. package/src/index.ts +10 -10
  79. package/harmony/rn_webview/src/main/ets/CutomReference.ts +0 -30
  80. package/harmony/rn_webview/src/main/ets/ShouldRequestUrl.ts +0 -48
package/CHANGELOG.md ADDED
@@ -0,0 +1,128 @@
1
+ # Changelog
2
+
3
+ ## [13.16.2] - 2026-08-17
4
+
5
+ ### Added
6
+ - 适配webview嵌套滚动
7
+ - 新增renderMode属性
8
+ - react-native-webview适配文本长按禁用选择框
9
+ - react-native-webview适配mediaCapturePermissionGrantType属性
10
+ - add landscape/portrait switching for video([#122](https://gitcode.com/CPF-RN/rntpc_react-native-webview/pull/122))
11
+
12
+ ### Fixed
13
+ - 修改web链接校验方案
14
+ - 修改forceDarkOn属性颜色设置错误的问题([#103](https://gitcode.com/CPF-RN/rntpc_react-native-webview/issues/103))
15
+ - Resolve the stability issues and memory leaks ([#123](https://gitcode.com/CPF-RN/rntpc_react-native-webview/pull/123))
16
+
17
+
18
+ ## [13.16.1] - 2026-03-26
19
+
20
+ ### Added
21
+ - Upgrade to the upstream community version
22
+ - add OpenHarmony support for react-native-webview
23
+
24
+ ### Changed
25
+
26
+ ### Fixed
27
+
28
+ ## ReleaseLog
29
+ ### v13.15.0
30
+ #### Features
31
+ - **android:** add support for enabling the Payment Request API ([#2278](https://github.com/react-native-webview/react-native-webview/issues/2278)) ([#3763](https://github.com/react-native-webview/react-native-webview/issues/3763)) ([4ea6d6b](https://github.com/react-native-webview/react-native-webview/commit/4ea6d6bcb20835eb46fbcf04a69b363ed9fd3b5f))
32
+
33
+ ### v13.14.2
34
+ #### Bug Fixes
35
+ - **android:** suppressMenuItems native view config name with extra space ([#3780](https://github.com/react-native-webview/react-native-webview/issues/3780)) ([5a73948](https://github.com/react-native-webview/react-native-webview/commit/5a7394836a3e03aaf170ef3227ddf8dcd89241cf))
36
+
37
+ ### v13.14.1
38
+ #### Bug Fixes
39
+ - support react-native-codegen properly ([#3777](https://github.com/react-native-webview/react-native-webview/issues/3777)) ([823e6ae](https://github.com/react-native-webview/react-native-webview/commit/823e6aeefb9216c4c3aa00f93bb840e5a925d690))
40
+
41
+ ### v13.14.0
42
+ #### Features
43
+ - **ios:** Added support for scrollview indicatorStyle ([#3743](https://github.com/react-native-webview/react-native-webview/issues/3743)) ([6af6a83](https://github.com/react-native-webview/react-native-webview/commit/6af6a830aea5b57ca68c1935c927759244c7d6fd))
44
+
45
+ ### v13.13.5
46
+ #### Bug Fixes
47
+ - **android:** onMessage exception on fallback path ([#3741](https://github.com/react-native-webview/react-native-webview/issues/3741)) ([73ff3a8](https://github.com/react-native-webview/react-native-webview/commit/73ff3a836bffcec2d6a7e1b39406bc31a34446b0))
48
+
49
+ ### v13.13.4
50
+ #### Bug Fixes
51
+ - **ios, new-arch:** Fixed regression caused by new defaults applied ([#3731](https://github.com/react-native-webview/react-native-webview/issues/3731)) ([964ffcc](https://github.com/react-native-webview/react-native-webview/commit/964ffccf1102bfa757d7cee6039dc0bfe405b4a6))
52
+
53
+ ### v13.13.3
54
+ #### Bug Fixes
55
+ - **newArch:** Set correct default values for "true" booleans ([#3726](https://github.com/react-native-webview/react-native-webview/issues/3726)) ([a2e1e4d](https://github.com/react-native-webview/react-native-webview/commit/a2e1e4d8525f115df17cdb0876335c6b04bbdd54))
56
+
57
+ ### v13.13.2
58
+ #### Bug Fixes
59
+ - **iOS:** use canGoForward value for return values ([#3659](https://github.com/react-native-webview/react-native-webview/issues/3659)) ([b5c40c9](https://github.com/react-native-webview/react-native-webview/commit/b5c40c9a328818fd03731598ae2ef57ddd2169f8))
60
+
61
+ ### v13.13.1
62
+ #### Bug Fixes
63
+ - **android,ios:** Sending correct url in onMessage callback ([#3609](https://github.com/react-native-webview/react-native-webview/issues/3609)) ([2c5096d](https://github.com/react-native-webview/react-native-webview/commit/2c5096d948f0e9e22ab020833004dd7ed9a74788))
64
+
65
+ ### v13.13.0
66
+ #### Features
67
+ - support RN 0.77 ([#3661](https://github.com/react-native-webview/react-native-webview/issues/3661)) ([685b8c7](https://github.com/react-native-webview/react-native-webview/commit/685b8c78d5d6aacaff5c8ea3cac5847e3a397ae2)), closes [/github.com/facebook/react-native/commit/145c72f8163048f0eee30d5ce850911f5dad865c#diff-cab6c32d3e05344091c804ea93e8a220dabdd75ec2a258aaf4bde7751c13f844R29](https://github.com//github.com/facebook/react-native/commit/145c72f8163048f0eee30d5ce850911f5dad865c/issues/diff-cab6c32d3e05344091c804ea93e8a220dabdd75ec2a258aaf4bde7751c13f844R29)
68
+
69
+ ### v13.12.5
70
+ Hey all, a little bit of context, I've been super busy with work these past months, and had less time to review webview stuff. The original PR was not merged by me but by another maintainer that did not measure the impact of the change. Thank y'all for pushing on those issues and PR, you are the best. I should have been more alert to the notifications still.
71
+
72
+ Regarding more general initialization issues: new arch introduced quite a few subtle changes and I wanted to rewrite a lot of things and drop support for old arch. I want to support preloading, keeping instances alive and more, but that takes time. In the meantime thanks for the help keeping it as functional as possible!
73
+ #### Bug Fixes
74
+ - **iOS:** revert ([`e8f3c0e`](https://github.com/react-native-webview/react-native-webview/commit/e8f3c0edee77bee3922db413ba87f1665e50e79b)) preload WebView on initial render in background tabs ([#3559](https://github.com/react-native-webview/react-native-webview/issues/3559) by [@sheat-git](https://github.com/sheat-git)) ([#3615](https://github.com/react-native-webview/react-native-webview/issues/3615)) ([fcbe0a5](https://github.com/react-native-webview/react-native-webview/commit/fcbe0a5cd68823fb990079305b3d20a9f7a32d67))
75
+
76
+ ### v13.12.4
77
+ #### Bug Fixes
78
+ - **android:** allowFileAccess does not apply to initial loading ([#3598](https://github.com/react-native-webview/react-native-webview/issues/3598)) ([8ad2360](https://github.com/react-native-webview/react-native-webview/commit/8ad2360ccbd62de5112b90c41fcdee56129b6294))
79
+
80
+ ### v13.12.3
81
+ #### Bug Fixes
82
+ - **iOS:** preload WebView on initial render in background tabs ([#3559](https://github.com/react-native-webview/react-native-webview/issues/3559) by [@sheat-git](https://github.com/sheat-git)) ([e8f3c0e](https://github.com/react-native-webview/react-native-webview/commit/e8f3c0edee77bee3922db413ba87f1665e50e79b)), closes [#2431](https://github.com/react-native-webview/react-native-webview/issues/2431) [#3476](https://github.com/react-native-webview/react-native-webview/issues/3476) [#3481](https://github.com/react-native-webview/react-native-webview/issues/3481)
83
+
84
+ ### v13.12.2
85
+ #### Bug Fixes
86
+ - **android, new arch:** Do not execute commands twice ([#3552](https://github.com/react-native-webview/react-native-webview/issues/3552)) ([9953ca0](https://github.com/react-native-webview/react-native-webview/commit/9953ca0b185a3152df10be1ce4d7f1160f788e69))
87
+
88
+ ### v13.12.1
89
+ #### Bug Fixes
90
+ - **apple:** Updates how HTTP errors are handled ([#3545](https://github.com/react-native-webview/react-native-webview/issues/3545)) ([a835fff](https://github.com/react-native-webview/react-native-webview/commit/a835fffbf0b6d956acd713a1ec5811ab9c3289ea))
91
+
92
+ ### v13.12.0
93
+ #### Bug Fixes
94
+ - Implement missing methods of RNCWebViewManagerInterface in RNCWebViewManager ([#3536](https://github.com/react-native-webview/react-native-webview/issues/3536)) ([aab4030](https://github.com/react-native-webview/react-native-webview/commit/aab4030dfec98ee31f343915fa3e9d2b0d27da29))
95
+ #### Features
96
+ - add load method ([#3537](https://github.com/react-native-webview/react-native-webview/issues/3537)) ([7e49457](https://github.com/react-native-webview/react-native-webview/commit/7e49457d62234d475025fca5825502846c8eabbf))
97
+
98
+ ### v13.11.1
99
+ #### Bug Fixes
100
+ - Update escape-string-regexp to 4.x ([#3170](https://github.com/react-native-webview/react-native-webview/issues/3170)) ([9e2304e](https://github.com/react-native-webview/react-native-webview/commit/9e2304ea3d0a40c3246103e8330d3164cd4c7108))
101
+
102
+ ### v13.11.0
103
+ #### Features
104
+ - **iOS:** allowsPictureInPictureMediaPlayback added for iOS only ([#3497](https://github.com/react-native-webview/react-native-webview/issues/3497)) ([1d8205a](https://github.com/react-native-webview/react-native-webview/commit/1d8205af06dbb0bad0d8f208bb2a37ce5f732fd3))
105
+
106
+ ### v13.10.7
107
+ #### Bug Fixes
108
+ - issue where cookies were not being saved when Android WebView app was forcibly terminated ([#3176](https://github.com/react-native-webview/react-native-webview/issues/3176)) ([28af371](https://github.com/react-native-webview/react-native-webview/commit/28af371d7e15ad78db8d580e97717eb139dff7c2))
109
+
110
+ ### v13.10.6
111
+ #### Bug Fixes
112
+ - bug where setCookie completionHandler is never called ([#3470](https://github.com/react-native-webview/react-native-webview/issues/3470)) ([1b47805](https://github.com/react-native-webview/react-native-webview/commit/1b478056a7988990c5bad5ef108edbb19964d5df))
113
+
114
+ ### v13.10.5
115
+ #### Bug Fixes
116
+ - **new-arch:** Refactor Turbomodule to have distinct module name to avoid confusion with Fabric component ([#3462](https://github.com/react-native-webview/react-native-webview/issues/3462)) ([55077a7](https://github.com/react-native-webview/react-native-webview/commit/55077a74d825cedf3fec2f3a9ab219b0a9f97bc3))
117
+
118
+ ### v13.10.4
119
+ #### Bug Fixes
120
+ - **iOS:** Implement `[RCTConvert WKDataDetectorTypes:]` ([#3436](https://github.com/react-native-webview/react-native-webview/issues/3436)) ([d252578](https://github.com/react-native-webview/react-native-webview/commit/d252578486b7e0237ac60ad848a7654490eea8b7))
121
+
122
+ ### v13.10.3
123
+ #### Bug Fixes
124
+ - **ios:** Fix crash when opening 4xx pages with no description. ([#3416](https://github.com/react-native-webview/react-native-webview/issues/3416)) ([91d76ec](https://github.com/react-native-webview/react-native-webview/commit/91d76ec2359373bec846c71efd2a46c3d7ad310d))
125
+
126
+ ### v13.10.2
127
+ #### Bug Fixes
128
+ - **iOS:** Replace unsupported nullish coalescing operator for older iOS versions ([#3388](https://github.com/react-native-webview/react-native-webview/issues/3388)) ([d5749e0](https://github.com/react-native-webview/react-native-webview/commit/d5749e093e5309162d64aa814d4aa94e0df242a2))
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2015-present, Facebook, Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1
+ MIT License
2
+
3
+ Copyright (c) 2015-present, Facebook, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.
package/README.OpenSource CHANGED
@@ -1,11 +1,11 @@
1
- [
2
- {
3
- "Name": "react-native-webview",
4
- "License": "MIT License",
5
- "License File": " LICENSE ",
6
- "Version Number": "13.15.1-rc.1",
7
- "Owner" : "xiafeng@huawei.com",
8
- "Upstream URL": "https://github.com/react-native-webview/react-native-webview",
9
- "Description": "react-native-webview."
10
- }
1
+ [
2
+ {
3
+ "Name": "react-native-webview",
4
+ "License": "MIT License",
5
+ "License File": " LICENSE ",
6
+ "Version Number": "13.15.1-rc.1",
7
+ "Owner" : "xiafeng@huawei.com",
8
+ "Upstream URL": "https://github.com/react-native-webview/react-native-webview",
9
+ "Description": "react-native-webview."
10
+ }
11
11
  ]