mirror of
https://gitee.com/energye/energy.git
synced 2024-12-02 11:47:37 +08:00
增加 html5test 示例,用于检查CEF支持的功能
This commit is contained in:
parent
25ee87af0c
commit
cdb3e02d44
16
example/html5test/html5test.go
Normal file
16
example/html5test/html5test.go
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/energye/energy/v2/cef"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
//全局初始化 每个应用都必须调用的
|
||||||
|
cef.GlobalInit(nil, nil)
|
||||||
|
//创建应用
|
||||||
|
app := cef.NewApplication()
|
||||||
|
//指定一个URL地址,或本地html文件目录
|
||||||
|
cef.BrowserWindow.Config.Url = "http://html5test.com/index.html"
|
||||||
|
//运行应用
|
||||||
|
cef.Run(app)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user