Questions tagged [rsvp.js]

A lightweight library that provides tools for organizing asynchronous code

RSVP.js provides simple tools for organizing asynchronous code.

Specifically, it is a tiny implementation of Promises/A+ and a mixin for turning objects into event targets.

It works in node.js and the browser.

97 questions
0
votes
0 answers

Where are my closures?

I have a relatively simple example for you to explain the weird issue I'm seeing: this.applyActions = function (name, arg1, arg2, arg3, arg4, arg5, arg6) { var promise = new RSVP.Promise(function (resolve, reject) { //…
0
votes
1 answer

How to set the order elements are appended to a documentFragment when being returned async?

Odd question I guess... I'm building my DOM in memory and make heavy use of promises. Say I have this inside a for... loop: target = document.createDocumentFragment(); promises = [], pass, skip, store; for (i = 0; i < foo; i += 1) { element =…
frequent
  • 27,643
  • 59
  • 181
  • 333
0
votes
1 answer

Ember deferred tasks prevent test-helper promises from resolving

I'm developing an Ember-based application with front-end integration testing using QUnit and Teaspoon. I'm currently trying to implement a new feature that involves regular server queries using recursive calls of Ember.run.later. In much simplified…
gorner
  • 552
  • 2
  • 8
0
votes
1 answer

How to make wrapped jQuery promise fire the reject callback on error?

I'm wrapping a simple jQuery promise with RSVP and noticed that when I cause an error on purpose the failure callback is never invoked. I assume it's because when you use vanilla jQuery and the callback throws an error, the returned promise will not…
Toran Billups
  • 27,111
  • 40
  • 155
  • 268
-1
votes
1 answer

Ember BelongsTo within two models issue

Good day all, Models: lesson title: DS.attr('string'), guild: DS.belongsTo('guild') guild title: DS.attr('string'), color: DS.attr('string') I create structure for full-calendar in lessons controller events: function(){ var lessons =…
iTux
  • 1,946
  • 1
  • 16
  • 20
-2
votes
1 answer

Node, RSVP.js array of promises

i can get the RSVP array of promises to work: //if user wants to change username var promises = []; promises['username'] = new RSVP.Promise(function(resolve, reject){ if(user.username !== session.username){ //check if username is available …
itsme
  • 48,972
  • 96
  • 224
  • 345
-3
votes
1 answer

How to set RSVP promise into a chainable closure wrapper, using this pattern?

I want to take the RSVP global object, and wrap it into a closure inside my global app closure, so that I can readily call it the way I want to call it. It also makes it easier to remember for me on how to use it, later in development. Here's…
blamb
  • 4,220
  • 4
  • 32
  • 50
1 2 3 4 5 6
7