<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>****</title>
<script type="text/javascript">
var ws=null,embed=null;
// 扩展API加载完毕,现在可以正常调用扩展API
function plusReady(){
ws=plus.webview.currentWebview();
ws.addEventListener('show',createEmbed,false);
}
// 判断扩展API是否准备,否则监听"plusready"事件
if(window.plus){
plusReady();
}else{
document.addEventListener("plusready",plusReady,false);
}
// 创建子Webview
function createEmbed(){
plus.nativeUI.showWaiting('',{style:'black',modal:false,background:'rgba(0,0,0,0)'});
embed=plus.webview.create('http://*********','embed',{
top:'0px',
bottom:'0px',
position:'dock',
dock:'bottom',
bounce:'none',
scrollIndicator:'none',
scalable:false,
popGesture:'none',
cachemode: 'default',
videoFullscreen: 'auto',
softinputMode: 'adjustResize',
kernel: 'WKWebview'
});
ws.append(embed);
embed.addEventListener('loaded',function(){
plus.nativeUI.closeWaiting();
},false);
embed.addEventListener('loading',function(){
plus.nativeUI.showWaiting('',{style:'black',modal:false,background:'rgba(0,0,0,0)'});
},false);
}
createEmbed()
</script>
</head>
<body>
</body>
</html>