docs(ShutoApi): 添加事件处理函数的字段说明注释

This commit is contained in:
2026-01-22 19:01:47 +08:00
parent 3dc6520e68
commit d16a250a4c

View File

@@ -57,6 +57,12 @@ ShutoApi.removeEventListener = function (eventName, callback) {
// 内部事件处理函数,用于接收原生代码的事件通知
function onEvent(eventData) {
/*
字段 无回调事件 带回调事件
事件名字段 type eventName
回调ID字段 ❌ 无 ✅ callbackId
原生方法 fireEvent: fireEventWithCallback:
*/
if (eventData && eventData.type) {
// 无回调的事件
eventEmitter.emit(eventData.type, eventData.params);