import React from 'react'; import { NativeSyntheticEvent } from 'react-native'; import { WebViewError, WebViewSharedProps, WebViewProgressEvent } from './types/WebViewTypes'; declare enum WebViewState { IDLE = "IDLE", LOADING = "LOADING", ERROR = "ERROR" } declare type State = { viewState: WebViewState; lastErrorEvent: WebViewError | null; }; /** * Renders a native WebView. */ export default class WebView extends React.Component { static defaultProps: { overScrollMode: string; javaScriptEnabled: boolean; thirdPartyCookiesEnabled: boolean; scalesPageToFit: boolean; allowFileAccess: boolean; saveFormDataDisabled: boolean; originWhitelist: string[]; }; static isFileUploadSupported: () => Promise; state: State; webViewRef: React.RefObject>; goForward: () => void; goBack: () => void; reload: () => void; stopLoading: () => void; postMessage: (data: string) => void; /** * Injects a javascript string into the referenced WebView. Deliberately does not * return a response because using eval() to return a response breaks this method * on pages with a Content Security Policy that disallows eval(). If you need that * functionality, look into postMessage/onMessage. */ injectJavaScript: (data: string) => void; /** * We return an event with a bunch of fields including: * url, title, loading, canGoBack, canGoForward */ updateNavigationState: (event: NativeSyntheticEvent) => void; getWebViewHandle: () => number | null; onLoadingStart: (event: NativeSyntheticEvent) => void; onLoadingError: (event: NativeSyntheticEvent) => void; onLoadingFinish: (event: NativeSyntheticEvent) => void; onMessage: (event: NativeSyntheticEvent) => void; onLoadingProgress: (event: NativeSyntheticEvent) => void; render(): React.ReactNode; } export {};