2019-03-21 16:29:57 +02:00
|
|
|
import { Component } from 'react';
|
2019-03-20 12:35:13 +00:00
|
|
|
// eslint-disable-next-line
|
|
|
|
import { IOSWebViewProps, AndroidWebViewProps } from './lib/WebViewTypes';
|
|
|
|
|
2020-04-29 09:09:22 -07:00
|
|
|
export { FileDownload, WebViewMessageEvent, WebViewNavigation } from "./lib/WebViewTypes";
|
2019-09-09 16:53:35 +02:00
|
|
|
|
2019-03-27 08:25:59 +00:00
|
|
|
export type WebViewProps = IOSWebViewProps & AndroidWebViewProps;
|
|
|
|
|
2020-09-05 19:19:50 +08:00
|
|
|
declare class WebView<P = {}> extends Component<WebViewProps & P> {
|
2019-03-21 16:29:57 +02:00
|
|
|
/**
|
|
|
|
* Go back one page in the webview's history.
|
|
|
|
*/
|
|
|
|
goBack: () => void;
|
2019-03-20 12:35:13 +00:00
|
|
|
|
2019-03-21 16:29:57 +02:00
|
|
|
/**
|
|
|
|
* Go forward one page in the webview's history.
|
|
|
|
*/
|
|
|
|
goForward: () => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reloads the current page.
|
|
|
|
*/
|
|
|
|
reload: () => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Stop loading the current page.
|
|
|
|
*/
|
|
|
|
stopLoading(): void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Extra Native Component Config.
|
|
|
|
*/
|
|
|
|
extraNativeComponentConfig: () => any;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Executes the JavaScript string.
|
|
|
|
*/
|
|
|
|
injectJavaScript: (script: string) => void;
|
2019-08-06 11:56:59 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Focuses on WebView redered page.
|
|
|
|
*/
|
|
|
|
requestFocus: () => void;
|
2020-08-31 06:18:57 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Posts a message to WebView.
|
|
|
|
*/
|
|
|
|
postMessage: (message: string) => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* (Android only)
|
|
|
|
* Removes the autocomplete popup from the currently focused form field, if present.
|
|
|
|
*/
|
|
|
|
clearFormData: () => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* (Android only)
|
|
|
|
* Clears the resource cache. Note that the cache is per-application, so this will clear the cache for all WebViews used.
|
|
|
|
*/
|
|
|
|
clearCache: (clear: boolean) => void;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* (Android only)
|
|
|
|
* Tells this WebView to clear its internal back/forward list.
|
|
|
|
*/
|
|
|
|
clearHistory: () => void;
|
2019-03-26 03:31:50 +03:00
|
|
|
}
|
2019-03-21 16:29:57 +02:00
|
|
|
|
|
|
|
export {WebView};
|
2019-03-20 12:35:13 +00:00
|
|
|
export default WebView;
|