【发布时间】:2021-08-18 22:02:15
【问题描述】:
下面是我尝试转换为 ES5 以兼容 IE 的代码。
$.when(...requests).then(function(...responses) {
// More code goes here
}
到目前为止,我可以将其转换为以下内容并且效果很好,但我仍然无法替换 then 部分。
$.when.apply(null, requests).then(function(...responses) {
// More code goes here
}
任何建议都将不胜感激。
【问题讨论】:
-
为什么不转译代码?
-
另外,您似乎只是在询问其他参数语法:
function(...responses)。只有$.when(...requests)使用传播。
标签: javascript jquery ecmascript-6