@javascriptcommon/react-native-webview 13.12.19 → 13.12.20
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.
- package/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManagerImpl.kt +5 -0
- package/android/src/newarch/com/reactnativecommunity/webview/RNCWebViewManager.java +6 -0
- package/android/src/oldarch/com/reactnativecommunity/webview/RNCWebViewManager.java +5 -0
- package/package.json +1 -1
|
@@ -539,6 +539,11 @@ class RNCWebViewManagerImpl(private val newArch: Boolean = false) {
|
|
|
539
539
|
val view = viewWrapper.webView
|
|
540
540
|
view.settings.mediaPlaybackRequiresUserGesture = value
|
|
541
541
|
}
|
|
542
|
+
|
|
543
|
+
fun setContentBlockerEnabled(viewWrapper: RNCWebViewWrapper, value: Boolean) {
|
|
544
|
+
val view = viewWrapper.webView
|
|
545
|
+
view.settings.contentBlockerEnabled = value
|
|
546
|
+
}
|
|
542
547
|
|
|
543
548
|
fun setHasOnScroll(viewWrapper: RNCWebViewWrapper, value: Boolean) {
|
|
544
549
|
val view = viewWrapper.webView
|
|
@@ -219,6 +219,12 @@ public class RNCWebViewManager extends ViewGroupManager<RNCWebViewWrapper>
|
|
|
219
219
|
mRNCWebViewManagerImpl.setMediaPlaybackRequiresUserAction(view, value);
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
+
@Override
|
|
223
|
+
@ReactProp(name = "contentBlockerEnabled")
|
|
224
|
+
public void setContentBlockerEnabled(RNCWebViewWrapper view, boolean value) {
|
|
225
|
+
mRNCWebViewManagerImpl.setContentBlockerEnabled(view, value);
|
|
226
|
+
}
|
|
227
|
+
|
|
222
228
|
@Override
|
|
223
229
|
@ReactProp(name = "menuItems")
|
|
224
230
|
public void setMenuItems(RNCWebViewWrapper view, @Nullable ReadableArray items) {
|
|
@@ -178,6 +178,11 @@ public class RNCWebViewManager extends ViewGroupManager<RNCWebViewWrapper> {
|
|
|
178
178
|
mRNCWebViewManagerImpl.setMediaPlaybackRequiresUserAction(view, value);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
+
@ReactProp(name = "contentBlockerEnabled")
|
|
182
|
+
public void setContentBlockerEnabled(RNCWebViewWrapper view, boolean value) {
|
|
183
|
+
mRNCWebViewManagerImpl.setContentBlockerEnabled(view, value);
|
|
184
|
+
}
|
|
185
|
+
|
|
181
186
|
@ReactProp(name = "messagingEnabled")
|
|
182
187
|
public void setMessagingEnabled(RNCWebViewWrapper view, boolean value) {
|
|
183
188
|
mRNCWebViewManagerImpl.setMessagingEnabled(view, value);
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"Thibault Malbranche <malbranche.thibault@gmail.com>"
|
|
11
11
|
],
|
|
12
12
|
"license": "MIT",
|
|
13
|
-
"version": "13.12.
|
|
13
|
+
"version": "13.12.20",
|
|
14
14
|
"homepage": "https://github.com/react-native-webview/react-native-webview#readme",
|
|
15
15
|
"scripts": {
|
|
16
16
|
"android": "react-native run-android",
|