getLaunchWebview( )

MUI HTML5

MUI

getLaunchWebview( )

获取应用首页WebviewObject窗口对象


WebviewObject plus.webview.getLaunchWebview();
				

参数:

返回值:

WebviewObject : WebviewObject窗口对象

示例:


<!DOCTYPE html>
<html>
	<head>
	<meta charset="utf-8">
	<title>Webview Example</title>
	<script type="text/javascript">
// H5 plus事件处理
function plusReady(){
	// 获取应用首页窗口对象
	var h=plus.webview.getLaunchWebview();
	console.log( "应用首页Webview窗口:"+h.getURL() );
}
if(window.plus){
	plusReady();
}else{
	document.addEventListener("plusready",plusReady,false);
}
	</script>
	</head>
	<body>
		获取应用首页WebviewObject窗口对象
	</body>
</html>