forked from react-native-webview/react-native-webview
-
Notifications
You must be signed in to change notification settings - Fork 19
/
index.d.ts
65 lines (52 loc) · 1.6 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import { Component } from 'react';
// eslint-disable-next-line
import { IOSWebViewProps, AndroidWebViewProps, WindowsWebViewProps } from 'react-native-webview/lib/WebViewTypes';
export { FileDownload, WebViewMessageEvent, WebViewNavigation } from "react-native-webview/lib/WebViewTypes";
export type WebViewProps = IOSWebViewProps & AndroidWebViewProps & WindowsWebViewProps;
declare class WebView<P = {}> extends Component<WebViewProps & P> {
/**
* Go back one page in the webview's history.
*/
goBack: () => void;
/**
* Go forward one page in the webview's history.
*/
goForward: () => void;
/**
* Reloads the current page.
*/
reload: () => void;
/**
* Stop loading the current page.
*/
stopLoading(): void;
/**
* Executes the JavaScript string.
*/
injectJavaScript: (script: string) => void;
/**
* Focuses on WebView redered page.
*/
requestFocus: () => void;
/**
* 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;
}
export {WebView};
export default WebView;