Is it possible to add methods to JQuery's promise object?

后端 未结 3 1173
萌比男神i
萌比男神i 2021-01-17 02:23

I want to add a catch method to JQuery\'s promise object so I don\'t have to type the following every time:

.then(null,function(dat         


        
3条回答
  •  不知归路
    2021-01-17 03:09

    Frankly, I wouldn't use jQuery "Promises" at all since they do not even follow the spec. Use the bluebird library, for example.

提交回复
热议问题