Every line of 'ajax finally' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
315 ['finally'](function onFinally() { 316 proclaim.ok(arguments.length === 0); 317 setTimeout(done, 1.5e3); 318 return new Promise(function(resolve, reject) { 319 setTimeout(function() { return reject(4);}, 1e3); 320 }); 321 }).then(function onFulfilled(x) {
170 ['finally'](function onFinally() { 171 proclaim.ok(arguments.length === 0); 172 setTimeout(done, 0.1e3); 173 return new Promise(function() {}); // forever pending 174 }).then(function onFulfilled() {
118 return Promise.reject(anotherReason)['finally'](function onFinally() { 119 proclaim.ok(arguments.length === 0); 120 throw someRejectionReason; 121 }).then(function onFulfilled() {
136 ['finally'](function onFinally() { 137 proclaim.ok(arguments.length === 0); 138 return 4; 139 }).then(function onFulfilled(x) {
310 .finally(function onFinally() { 311 assert(arguments.length === 0); 312 timeout = setTimeout(done, 1.5e3); 313 return new P((resolve, reject) => { setTimeout(() => reject(4), 1e3); }); 314 })
96 .finally(function onFinally() { 97 assert(arguments.length === 0); 98 return 4; 99 })
5 promiseInstance.prototype['finally'] = function finallyPolyfill(callback) { 6 let constructor = this.constructor; 7 return this.then( 8 function(value) { 9 return constructor.resolve(callback()).then(function() { 10 return value; 11 }); 12 }, 13 function(reason) { 14 return constructor.resolve(callback()).then(function() { 15 throw reason; 16 }); 17 } 18 ); 19 };
227 finally(callback?: T | undefined, label?: string) { 228 return this.promise!.finally(callback, label); 229 }