crawlergo icon indicating copy to clipboard operation
crawlergo copied to clipboard

[Code Review] js 回调 golang 的方法

Open PIGfaces opened this issue 2 years ago • 0 comments

问题描述

在阅读源码感叹大佬的强大时,修炼尚浅的我无法明白注入页面的 addLink 使用异步函数方法重写的原因。大佬可否解答一下。 为何最后要再通过 DeliverResult 方法来触发,这里有点绕

https://github.com/Qianlitp/crawlergo/blob/9d6f751f05c19d66ceaf8f00a4185c03c6ccfa2b/pkg/js/javascript.go#L253-L265

PIGfaces avatar Aug 03 '22 08:08 PIGfaces