Code Monkey home page Code Monkey logo

Comments (5)

mehiel avatar mehiel commented on May 9, 2024

In my case I wanted to change that behaviour so on top of #7 fix/workaround, I created another branch to have .then behave correctly on piping. Again, propably I could do some cleanup if you consider a pull-request.

from jdeferred.

saturnism avatar saturnism commented on May 9, 2024

thanks @mehiel ! I'll be on a roadtrip for a week or 2. i'll take a look in detail once i'm back.

from jdeferred.

mehiel avatar mehiel commented on May 9, 2024

@saturnism, have fun and maybe we can elaborate on these things when you'll be back!

from jdeferred.

saturnism avatar saturnism commented on May 9, 2024

@mehiel i'm back and i've been researching into this a bit. it seems like done callbacks shouldn't have the ability to reject - because in order to trigger done callback, a resolve was already called and state is already changed?

what do you feel if the exception is handled within the callback itself, or maybe have an unexpected exception callback?

A implementation that looks pretty clean is using then/pipe and returning a new deferred object - this is something that can't be done in current jdeferred implementation, but it seems worthwhile to pursue.

http://stackoverflow.com/questions/13798770/unable-to-reject-jquery-deferred-with-a-piped-function-if-it-was-resolved-by-a-p

from jdeferred.

mehiel avatar mehiel commented on May 9, 2024

see issue #10 for piping. It is closer to what jQuery does.

from jdeferred.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.