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

upgrade-dev v2.3.7

上级 35520a8a
......@@ -29,7 +29,7 @@ type IContext interface {
ArgumentList() json.JSONArray //参数列表
BrowserId() int32 //事件所属 browser id
FrameId() int64 //事件所属 frame id
Replay() IReplay //回复
Replay() IReplay //回复, 触发事件返回结果是 IContext 时,该字段为nil
Result(data ...interface{}) //返回结果
}
......
......@@ -57,6 +57,7 @@ func createCallback(fn any) *callback {
}
}
// SetProcessMessage 设置进程消息对象, 不需要手动调用
func SetProcessMessage(pm IProcessMessage) {
if browser == nil || pm == nil {
return
......@@ -178,7 +179,7 @@ func EmitTargetAndCallback(name string, target ITarget, argument []any, fn any)
}
//CheckOnEvent
// IPC 检查 GO 中监听的事件是否存在, 并返回回调函数
// IPC 检查 GO 中监听的事件是否存在,同时返回函数并移除
func CheckOnEvent(name string) *callback {
if browser == nil || name == "" {
return nil
......@@ -192,7 +193,7 @@ func CheckOnEvent(name string) *callback {
}
//CheckEmitCallback
// IPC 检查 GO Emit 回调函数是否存在,并返回回调函数
// IPC 检查 GO Emit 回调函数是否存在,同时返回函数并移除
func CheckEmitCallback(id int32) *callback {
if browser == nil {
return nil
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册