energy/example/simple/simple.go

17 lines
341 B
Go
Raw Normal View History

2022-10-04 13:21:05 +08:00
package main
import (
"github.com/energye/energy/cef"
)
func main() {
2022-10-05 16:38:43 +08:00
//全局初始化 每个应用都必须调用的
cef.GlobalInit(nil, nil)
2022-10-05 16:38:43 +08:00
//创建应用
2023-02-28 18:41:12 +08:00
cefApp := cef.NewApplication()
2022-10-18 17:18:13 +08:00
//指定一个URL地址或本地html文件目录
cef.BrowserWindow.Config.Url = "https://www.baidu.com"
2022-10-06 15:41:33 +08:00
//运行应用
2022-10-04 13:21:05 +08:00
cef.Run(cefApp)
}