Skip to content

Commit 7ebb172

Browse files
committed
Add contentMode
1 parent ebf1813 commit 7ebb172

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Diff for: README.md

+10-2
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,14 @@ _iOS only_
465465

466466
Specifies how safe area insets are used to modify content area of the scroll view, defaults to `` `never ``. Available on iOS 11 and later.
467467

468+
#### `` contentMode: [ | `recommended | `mobile | `desktop] ``
469+
470+
_iOS only_
471+
472+
Controls the type of content to load. Available on iOS 13 and later. Defaults to `recommended`, which loads mobile content on iPhone & iPad Mini but desktop content on larger iPads.
473+
474+
More info at <https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#contentMode>
475+
468476
#### `dataDetectorTypes: array(DataDetectorTypes.t)`
469477

470478
Specifies types of data to be converted to clickable URLs in content of the WebView, defaults to `[|DataDetectorTypes.phoneNumber|]`. Refer to [`DataDetectorTypes.t`](#datadetectortypest) for all valid values.
@@ -624,7 +632,7 @@ _iOS only_
624632

625633
Specifies function to be invoked when the `WebView` is about to download a file.
626634

627-
<https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#onFileDownload>
635+
More info at <https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#onFileDownload>
628636

629637
#### `onError: WebViewErrorEvent.t => unit`
630638

@@ -665,7 +673,7 @@ Note that this method will not be invoked on hash URL changes (e.g. from https:/
665673
_Android only_
666674
Function that is invoked when the `WebView` process crashes or is killed by the OS.
667675

668-
<https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#onRenderProcessGone>
676+
More info at <https://github.com/react-native-webview/react-native-webview/blob/master/docs/Reference.md#onRenderProcessGone>
669677

670678
#### `onShouldStartLoadWithRequest: Js.t(webViewShouldStartLoadWithRequest) => bool`
671679

Diff for: src/ReactNativeWebView.re

+1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ external make:
189189
| `scrollableAxes
190190
]
191191
=?,
192+
~contentMode: [ | `recommended | `mobile | `desktop]=?,
192193
~dataDetectorTypes: array(DataDetectorTypes.t)=?,
193194
~decelerationRate: DecelerationRate.t=?,
194195
~directionalLockEnabled: bool=?,

0 commit comments

Comments
 (0)