@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.
32 lines (31 loc) • 1.35 kB
TypeScript
import { IOSWebViewWrapper, WebViewExtBase } from "./webview-ext-common";
export * from "./webview-ext-common";
export declare class WebViewExt extends WebViewExtBase {
protected nativeWrapper: IOSWebViewWrapper;
readonly isUIWebView: boolean;
readonly isWKWebView: boolean;
createNativeView(): any;
initNativeView(): void;
disposeNativeView(): void;
protected injectWebViewBridge(): Promise<void>;
executeJavaScript<T>(scriptCode: string, stringifyResult?: boolean): Promise<T>;
onLoaded(): void;
onUnloaded(): void;
stopLoading(): void;
_loadUrl(src: string): void;
_loadData(content: string): void;
readonly canGoBack: boolean;
readonly canGoForward: boolean;
goBack(): void;
goForward(): void;
reload(): void;
registerLocalResource(resourceName: string, path: string): void;
unregisterLocalResource(resourceName: string): void;
getRegisteredLocalResource(resourceName: string): string;
onUIWebViewEvent(url: string): Promise<void>;
getTitle(): Promise<string>;
autoLoadStyleSheetFile(resourceName: string, filepath: string, insertBefore?: boolean): void;
removeAutoLoadStyleSheetFile(resourceName: string): void;
autoLoadJavaScriptFile(resourceName: string, filepath: string): void;
removeAutoLoadJavaScriptFile(resourceName: string): void;
}