import { ContainerView, EventData, Property } from '@nativescript/core/ui/core/view'; export * from '@nativescript/core/ui/core/view'; export interface ViewPortProperties { width?: number | 'device-width'; height?: number | 'device-height'; initialScale?: number; maximumScale?: number; minimumScale?: number; userScalable?: boolean; } export declare type CacheMode = 'default' | 'cache_first' | 'no_cache' | 'cache_only' | 'normal'; export declare const autoInjectJSBridgeProperty: Property; export declare const builtInZoomControlsProperty: Property; export declare const cacheModeProperty: Property; export declare const databaseStorageProperty: Property; export declare const domStorageProperty: Property; export declare const debugModeProperty: Property; export declare const displayZoomControlsProperty: Property; export declare const supportZoomProperty: Property; export declare const srcProperty: Property; export declare const scrollBounceProperty: Property; export declare const scalesPageToFitProperty: Property; export declare const isScrollEnabledProperty: Property; export declare type ViewPortValue = boolean | ViewPortProperties; export declare const viewPortProperty: Property; export declare enum EventNames { LoadFinished = "loadFinished", LoadProgress = "loadProgress", LoadStarted = "loadStarted", ShouldOverrideUrlLoading = "shouldOverrideUrlLoading", TitleChanged = "titleChange", WebAlert = "webAlert", WebConfirm = "webConfirm", WebConsole = "webConsole", WebPrompt = "webPrompt" } export interface LoadJavaScriptResource { resourceName: string; filepath: string; } export interface LoadStyleSheetResource { resourceName: string; filepath: string; insertBefore?: boolean; } export interface InjectExecuteJavaScript { scriptCode: string; name: string; } export interface LoadEventData extends EventData { object: AWebViewBase; url: string; navigationType?: NavigationType; error?: string; } export interface LoadStartedEventData extends LoadEventData { eventName: EventNames.LoadStarted; } export interface LoadFinishedEventData extends LoadEventData { eventName: EventNames.LoadFinished; } export interface ShouldOverrideUrlLoadEventData extends LoadEventData { eventName: EventNames.ShouldOverrideUrlLoading; httpMethod: string; cancel?: boolean; } export interface ShouldOverideUrlLoadEventData extends ShouldOverrideUrlLoadEventData { } export interface LoadProgressEventData extends EventData { object: AWebViewBase; eventName: EventNames.LoadProgress; url: string; progress: number; } export interface TitleChangedEventData extends EventData { object: AWebViewBase; eventName: EventNames.TitleChanged; url: string; title: string; } export interface WebAlertEventData extends EventData { object: AWebViewBase; eventName: EventNames.WebAlert; url: string; message: string; callback: () => void; } export interface WebPromptEventData extends EventData { object: AWebViewBase; eventName: EventNames.WebPrompt; url: string; message: string; defaultText?: string; callback: (response?: string) => void; } export interface WebConfirmEventData extends EventData { object: AWebViewBase; eventName: EventNames.WebConfirm; url: string; message: string; callback: (response: boolean) => void; } export interface WebConsoleEventData extends EventData { object: AWebViewBase; eventName: EventNames.WebConsole; url: string; data: { lineNo: number; message: string; level: string; }; } export interface WebViewEventData extends EventData { object: AWebViewBase; data?: any; } export declare type NavigationType = 'linkClicked' | 'formSubmitted' | 'backForward' | 'reload' | 'formResubmitted' | 'other' | void; export declare class UnsupportedSDKError extends Error { constructor(minSdk: number); } export declare class AWebViewBase extends ContainerView { static scrollEvent: string; static isFetchSupported: boolean; static isPromiseSupported: boolean; android: any; ios: any; get interceptScheme(): string; static get loadStartedEvent(): EventNames; static get loadFinishedEvent(): EventNames; static get shouldOverrideUrlLoadingEvent(): EventNames; static get loadProgressEvent(): EventNames; static get titleChangedEvent(): EventNames; static get webAlertEvent(): EventNames; static get webConfirmEvent(): EventNames; static get webPromptEvent(): EventNames; static get webConsoleEvent(): EventNames; readonly isUIWebView: boolean; readonly isWKWebView: boolean; src: string; autoInjectJSBridge: boolean; debugMode: boolean; builtInZoomControls: boolean; displayZoomControls: boolean; databaseStorage: boolean; domStorage: boolean; supportZoom: boolean; scrollBounce: boolean; scalesPageToFit: boolean; viewPortSize: ViewPortValue; cacheMode: 'default' | 'no_cache' | 'cache_first' | 'cache_only'; protected autoInjectScriptFiles: LoadJavaScriptResource[]; protected autoInjectStyleSheetFiles: LoadStyleSheetResource[]; protected autoInjectJavaScriptBlocks: InjectExecuteJavaScript[]; protected tempSuspendSrcLoading: boolean; headers?: { [k: string]: string; }; _onLoadFinished(url: string, error?: string): Promise; _onLoadStarted(url: string, navigationType?: NavigationType): void; _onShouldOverrideUrlLoading(url: string, httpMethod: string, navigationType?: NavigationType): boolean; _loadProgress(progress: number): void; _titleChanged(title: string): void; _webAlert(message: string, callback: () => void): boolean; _webConfirm(message: string, callback: (response: boolean) => void): boolean; _webPrompt(message: string, defaultText: string, callback: (response: string) => void): boolean; _webConsole(message: string, lineNo: number, level: string): boolean; _loadUrl(src: string, headers?: { [k: string]: string; }): void; _loadData(src: string): void; stopLoading(): void; get canGoBack(): boolean; get canGoForward(): boolean; goBack(): void; goForward(): void; reload(): void; resolveLocalResourceFilePath(filepath: string): string | void; registerLocalResource(name: string, filepath: string): void; unregisterLocalResource(name: string): void; getRegisteredLocalResource(name: string): string; loadUrl(src: string): Promise; loadJavaScriptFile(scriptName: string, filepath?: string): Promise; loadJavaScriptFiles(files: LoadStyleSheetResource[]): Promise; loadStyleSheetFile(stylesheetName: string, filepath: string, insertBefore?: boolean): Promise; loadStyleSheetFiles(files: LoadStyleSheetResource[]): Promise; autoLoadJavaScriptFile(resourceName: string, filepath: string): void; removeAutoLoadJavaScriptFile(resourceName: string): void; autoLoadStyleSheetFile(resourceName: string, filepath: string, insertBefore?: boolean): void; removeAutoLoadStyleSheetFile(resourceName: string): void; autoExecuteJavaScript(scriptCode: string, name: string): void; removeAutoExecuteJavaScript(name: string): void; normalizeURL(url: string): string; protected ensureFetchSupport(): Promise; protected ensurePromiseSupport(): Promise; executeJavaScript(scriptCode: string, stringifyResult?: boolean): Promise; executePromise(scriptCode: string, timeout?: number): Promise; executePromises(scriptCodes: string[], timeout?: number): Promise; generateLoadJavaScriptFileScriptCode(scriptHref: string): string; generateLoadCSSFileScriptCode(stylesheetHref: string, insertBefore?: boolean): string; protected parseWebViewJavascriptResult(result: any): any; writeTrace(message: () => string, type?: number): void; emitToWebView(eventName: string, data: any): void; onWebViewEvent(eventName: string, data: any): void; getTitle(): Promise; onUIWebViewEvent(url: string): void; zoomIn(): boolean; zoomOut(): boolean; zoomBy(zoomFactor: number): void; fixLocalResourceName(resourceName: string): string; } export interface AWebViewBase { on(eventNames: string, callback: (data: WebViewEventData) => void, thisArg?: any): any; once(eventNames: string, callback: (data: WebViewEventData) => void, thisArg?: any): any; on(event: EventNames.ShouldOverrideUrlLoading, callback: (args: ShouldOverrideUrlLoadEventData) => void, thisArg?: any): any; once(event: EventNames.ShouldOverrideUrlLoading, callback: (args: ShouldOverrideUrlLoadEventData) => void, thisArg?: any): any; on(event: EventNames.LoadStarted, callback: (args: LoadStartedEventData) => void, thisArg?: any): any; once(event: EventNames.LoadStarted, callback: (args: LoadStartedEventData) => void, thisArg?: any): any; on(event: EventNames.LoadFinished, callback: (args: LoadFinishedEventData) => void, thisArg?: any): any; once(event: EventNames.LoadFinished, callback: (args: LoadFinishedEventData) => void, thisArg?: any): any; on(event: EventNames.LoadProgress, callback: (args: LoadProgressEventData) => void, thisArg?: any): any; once(event: EventNames.LoadProgress, callback: (args: LoadProgressEventData) => void, thisArg?: any): any; on(event: EventNames.TitleChanged, callback: (args: TitleChangedEventData) => void, thisArg?: any): any; once(event: EventNames.TitleChanged, callback: (args: TitleChangedEventData) => void, thisArg?: any): any; on(event: EventNames.WebAlert, callback: (args: WebAlertEventData) => void, thisArg?: any): any; once(event: EventNames.WebAlert, callback: (args: WebAlertEventData) => void, thisArg?: any): any; on(event: EventNames.WebConfirm, callback: (args: WebConfirmEventData) => void, thisArg?: any): any; once(event: EventNames.WebConfirm, callback: (args: WebConfirmEventData) => void, thisArg?: any): any; on(event: EventNames.WebPrompt, callback: (args: WebPromptEventData) => void, thisArg?: any): any; once(event: EventNames.WebPrompt, callback: (args: WebPromptEventData) => void, thisArg?: any): any; on(event: EventNames.WebConsole, callback: (args: WebConsoleEventData) => void, thisArg?: any): any; once(event: EventNames.WebConsole, callback: (args: WebConsoleEventData) => void, thisArg?: any): any; } export interface IOSWebViewWrapper { owner: WeakRef; createNativeView(): any; initNativeView(): void; disposeNativeView(): void; onLoaded(): void; onUnloaded(): void; executeJavaScript(scriptCode: string): Promise; registerLocalResourceForNative(resourceName: string, filepath: string): void; unregisterLocalResourceForNative(resourceName: string): void; getRegisteredLocalResourceFromNative(resourceName: string): string; autoLoadStyleSheetFile(resourceName: string, filepath: string, insertBefore?: boolean): void; removeAutoLoadStyleSheetFile(resourceName: string): void; autoLoadJavaScriptFile(resourceName: string, filepath: string): Promise; removeAutoLoadJavaScriptFile(resourceName: string): void; stopLoading(): void; loadUrl(url: string): void; loadData(content: string): void; readonly canGoBack: boolean; readonly canGoForward: boolean; goBack(): void; goForward(): void; reload(): void; readonly shouldInjectWebViewBridge: boolean; enableAutoInject(enable: boolean): void; scrollBounce: boolean; scalesPageToFit: boolean; }