标准库增加 WebView2 控件 用于支持系统自带的 Edge(Chromium) 。

admin2021-03-03  2.5K+

终于等到这个好消息了。

import win.ui;
/*DSG{{*/
var winform = win.form(text="Edge 浏览器控件";right=759;bottom=469;bgcolor=16777215) 
/*}}*/

import web.view;
var wb = web.view(winform);

wb.export({
    alert = function(msg){
		winform.msgbox(msg)
		return 123; 
	}
	nativeLog = function(msg){
		winform.msgbox(msg) 
	}
})

wb.html = /**
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <style type="text/css">
    html,body{ height:100%; margin:100; } 
    </style>
    <script type="text/javascript">
    alert("test").then( v=>nativeLog(v))
    </script>
</head>
<body>
    测试中文
</body>
</html>
**/
//wb.go("http://ruanyf.github.io/es-checker/")

winform.show();
win.loopMessage();
转载请注明原文地址: https://www.aardio.net/read-159.html
最新回复(0)
网络应用
网络应用