我可以在 withSuccessHandler 中传递多个回调函数吗?

Can I pass multiple callback function inside withSuccessHandler?

这是我的代码 运行

document.addEventListener('DOMContentLoaded', function() {
google.script.run.withSuccessHandler(populateSearchDropDown).searchByVehicleNum();
});

现在我的问题是, 我可以在 withSuccessHandler 中传递 2 个回调函数吗?

像这样

google.script.run.withSuccessHandler(function1,function2).scriptFunc();

顺便说一句,我试过了,但它不起作用

那么,下面的修改怎么样?

发件人:

google.script.run.withSuccessHandler(function1,function2).scriptFunc();

收件人:

google.script.run.withSuccessHandler(sample).scriptFunc();

function sample(e) {
  function1(e);
  function2(e);
}

google.script.run.withSuccessHandler(e => {function1(e), function2(e)}).scriptFunc();

参考: