提交 02e5df2c 编写于 作者: yanghye's avatar yanghye

upgrade-dev v2.3.17

上级 d81f4668
......@@ -257,7 +257,11 @@ func (m *ipcRenderProcess) jsExecuteGoEvent(name string, object *ICefV8Value, ar
message := json.NewJSONObject(nil)
message.Set(ipc_id, messageId)
message.Set(ipc_event, emitNameValue)
message.Set(ipc_argumentList, json.NewJSONArray(args).Data())
if args != nil {
message.Set(ipc_argumentList, json.NewJSONArray(args).Data())
} else {
message.Set(ipc_argumentList, nil)
}
if m.v8Context.Frame() != nil {
m.v8Context.Frame().SendProcessMessageForJSONBytes(internalIPCJSExecuteGoEvent, consts.PID_BROWSER, message.Bytes())
args = nil
......
......@@ -87,7 +87,7 @@ func main() {
})
ipc.On("testGoEmitAndCallback", func() {
testGoEmitAndCallback++
//fmt.Println("testGoEmitAndCallback")
fmt.Println("testGoEmitAndCallback")
//触发JS监听的函数,并传入参数
//ipc.EmitAndCallback("onTestName2", []any{r0, r1 + count, r2, r3, r4, r5, r6, r7, r8, r9, r10}, func(r1 string) {
// //fmt.Println("onTestName2 r1: ", r1)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册