index.uts 520 字节
Newer Older
DCloud-yinjiacheng's avatar
DCloud-yinjiacheng 已提交
1 2 3 4 5 6 7 8 9 10 11 12
import { CanWebViewGoBack, CanWebViewGoForward } from "../interface";
import WebView from 'android.webkit.WebView';

export const canWebViewGoBack : CanWebViewGoBack = function (element : UniElement) : boolean {
  const view = element.getAndroidView<WebView>();
  return view == null ? false : view.canGoBack();
}

export const canWebViewGoForward : CanWebViewGoForward = function (element : UniElement) : boolean {
  const view = element.getAndroidView<WebView>();
  return view == null ? false : view.canGoForward();
}