Skip to content
On this page

webview 自身相关

介绍

设置状态栏颜色,打开、关闭 webview

目录

关闭页面

接口名称

TrinaPlugin exit

示例

js
window.cordova.exec(
  (data) => {
    console.log("成功", data);
  },
  (err) => {
    console.log("失败", err);
  },
  "TrinaPlugin",
  "exit",
  []
);

API

入参

参数必传类型默认值说明

出参

参数类型说明

打开新页面

接口名称

TrinaPlugin openWebUrl

示例

js
window.cordova.exec(
  (data) => {
    console.log("成功", data);
  },
  (err) => {
    console.log("失败", err);
  },
  "TrinaPlugin",
  "openWebUrl",
  ["https://www.baidu.com", 1]
);

API

入参

数组:第一元素为跳转的 url,第二个元素为跳转类型

参数必传类型默认值说明
[url]是string无跳转的 url
[type]否int00:不导航栏, 1:带导航栏, 2:外部浏览器打开

出参

参数类型说明