UNPKG

@nota/nativescript-webview-ext

Version:

Extended WebView for NativeScript which adds 'x-local' scheme for local-files. events between WebView and native-layer, javascript execution, injecting CSS and JS-files.

45 lines (44 loc) 1.89 kB
import { IOSWebViewWrapper, WebViewExtBase } from "./webview-ext-common"; export declare class UIWebViewDelegateImpl extends NSObject implements UIWebViewDelegate { static ObjCProtocols: { prototype: UIWebViewDelegate; }[]; private owner; static initWithOwner(owner: WeakRef<WebViewExtBase>): UIWebViewDelegateImpl; webViewShouldStartLoadWithRequestNavigationType(webView: UIWebView, request: NSURLRequest, navigationType: number): boolean; uiWebViewJSNavigation: boolean; webViewDidStartLoad(webView: UIWebView): void; webViewDidFinishLoad(webView: UIWebView): void; webViewDidFailLoadWithError(webView: UIWebView, error: NSError): void; } export declare class UIWebViewWrapper implements IOSWebViewWrapper { owner: WeakRef<WebViewExtBase>; readonly ios: UIWebView | void; protected uiWebViewDelegate: UIWebViewDelegateImpl; readonly shouldInjectWebViewBridge = true; readonly autoInjectJSBridge: boolean; constructor(owner: WebViewExtBase); createNativeView(): UIWebView; initNativeView(): void; disposeNativeView(): void; onLoaded(): void; onUnloaded(): void; stopLoading(): void; loadUrl(src: string): void; registerLocalResourceForNative(resourceName: string, filepath: string): void; unregisterLocalResourceForNative(resourceName: string): void; getRegisteredLocalResourceFromNative(resourceName: string): string; loadData(content: string): void; readonly canGoBack: boolean; readonly canGoForward: boolean; goBack(): void; goForward(): void; reload(): void; executeJavaScript(scriptCode: string): Promise<any>; autoLoadStyleSheetFile(): void; removeAutoLoadStyleSheetFile(): void; autoLoadJavaScriptFile(): Promise<void>; removeAutoLoadJavaScriptFile(): void; enableAutoInject(enable: boolean): void; scrollBounce: boolean; }