Giter Site home page Giter Site logo

Comments (5)

ibolmo avatar ibolmo commented on August 24, 2024

worksforme.

Here's the deal. If you set async to false then the method Request.send is blocked by line 199 because you asked that it should (remember the async false?).

Since send is blocked and eventually fires the events (e.g. onSuccess) and then sets up the delay, but by then send is all done and the request has already finished.

Re-open if you have another problem.

from mootools-core.

kguelzau avatar kguelzau commented on August 24, 2024

I don't have the permission to reopen.

It's OK that Request.send is blocking with async=false.
But it doesn't make any sense to me to trigger the timeout delay if i already know that the request definitely has already been finished.
So one option is to remove timeout handling completely (what i suggested) or to start the delay right before send.

from mootools-core.

ibolmo avatar ibolmo commented on August 24, 2024

Ah I see what you mean, but I think the options are mutually exclusive. You either do async: false or you do timeout: 1000.

If you do async: false the XHR transport will rely on server timeout or browser set timeout (internal to the transport, or perhaps a blocking protection which will prompt user to kill the javascript that is blocking) to return execution to the script.

I've reopened this issue as a documentation issue. Do you agree?

from mootools-core.

ibolmo avatar ibolmo commented on August 24, 2024

@arian @cpojer, we could still reduce headaches if we do as @kguelzau mentioned. To add an else if. If you guys agree with my last comment, I don't see a problem of adding that else if on this line.

from mootools-core.

cpojer avatar cpojer commented on August 24, 2024

from mootools-core.

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.