react-native-webview

  • Version 13.10.5
  • Published
  • 645 kB
  • 2 dependencies
  • MIT license

Install

npm i react-native-webview
yarn add react-native-webview
pnpm add react-native-webview

Overview

React Native WebView component for iOS, Android, macOS, and Windows

Index

Classes

class WebView

class WebView<P = {}> extends Component<WebViewProps & P> {}

    property clearCache

    clearCache?: (clear: boolean) => void;
    • (Android only) Clears the resource cache. Note that the cache is per-application, so this will clear the cache for all WebViews used.

    property clearFormData

    clearFormData?: () => void;
    • (Android only) Removes the autocomplete popup from the currently focused form field, if present.

    property clearHistory

    clearHistory?: () => void;
    • (Android only) Tells this WebView to clear its internal back/forward list.

    property goBack

    goBack: () => void;
    • Go back one page in the webview's history.

    property goForward

    goForward: () => void;
    • Go forward one page in the webview's history.

    property injectJavaScript

    injectJavaScript: (script: string) => void;
    • Executes the JavaScript string.

    property postMessage

    postMessage: (message: string) => void;
    • Posts a message to WebView.

    property reload

    reload: () => void;
    • Reloads the current page.

    property requestFocus

    requestFocus: () => void;
    • Focuses on WebView redered page.

    method stopLoading

    stopLoading: () => void;
    • Stop loading the current page.

    Interfaces

    interface FileDownload

    interface FileDownload {}

      property downloadUrl

      downloadUrl: string;

        interface WebViewNavigation

        interface WebViewNavigation extends WebViewNativeEvent {}

          property mainDocumentURL

          mainDocumentURL?: string;

            property navigationType

            navigationType:
            | 'click'
            | 'formsubmit'
            | 'backforward'
            | 'reload'
            | 'formresubmit'
            | 'other';

              Type Aliases

              type WebViewMessageEvent

              type WebViewMessageEvent = NativeSyntheticEvent<WebViewMessage>;

                type WebViewProps

                type WebViewProps = IOSWebViewProps & AndroidWebViewProps & WindowsWebViewProps;

                  Package Files (2)

                  Dependencies (2)

                  Dev Dependencies (28)

                  Peer Dependencies (2)

                  Badge

                  To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                  You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/react-native-webview.

                  • Markdown
                    [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/react-native-webview)
                  • HTML
                    <a href="https://www.jsdocs.io/package/react-native-webview"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>