Tero Paananen 4 anos atrás
pai
commit
3581ef2ad8
2 arquivos alterados com 25 adições e 2 exclusões
  1. 24
    1
      index.d.ts
  2. 1
    1
      package.json

+ 24
- 1
index.d.ts Ver arquivo

@@ -6,7 +6,7 @@ export { FileDownload, WebViewMessageEvent, WebViewNavigation } from "./lib/WebV
6 6
 
7 7
 export type WebViewProps = IOSWebViewProps & AndroidWebViewProps;
8 8
 
9
-declare class WebView extends Component<WebViewProps> {
9
+declare class WebView<P = {}> extends Component<WebViewProps & P> {
10 10
     /**
11 11
      * Go back one page in the webview's history.
12 12
      */
@@ -41,6 +41,29 @@ declare class WebView extends Component<WebViewProps> {
41 41
      * Focuses on WebView redered page.
42 42
      */
43 43
     requestFocus: () => void;
44
+    
45
+     /**
46
+     * Posts a message to WebView.
47
+     */
48
+    postMessage: (message: string) => void;
49
+    
50
+     /**
51
+     * (Android only)
52
+     * Removes the autocomplete popup from the currently focused form field, if present.
53
+     */
54
+    clearFormData: () => void;
55
+
56
+     /**
57
+     * (Android only)
58
+     * Clears the resource cache. Note that the cache is per-application, so this will clear the cache for all WebViews used.
59
+     */
60
+    clearCache: (clear: boolean) => void;
61
+
62
+     /**
63
+     * (Android only)
64
+     * Tells this WebView to clear its internal back/forward list.
65
+     */
66
+    clearHistory: () => void;
44 67
 }
45 68
 
46 69
 export {WebView};

+ 1
- 1
package.json Ver arquivo

@@ -8,7 +8,7 @@
8 8
     "Thibault Malbranche <malbranche.thibault@gmail.com>"
9 9
   ],
10 10
   "license": "MIT",
11
-  "version": "10.8.2",
11
+  "version": "10.8.3",
12 12
   "homepage": "https://github.com/react-native-community/react-native-webview#readme",
13 13
   "scripts": {
14 14
     "start": "node node_modules/react-native/local-cli/cli.js start",