env-js icon indicating copy to clipboard operation
env-js copied to clipboard

create a real async XHR

Open smparkes opened this issue 15 years ago • 2 comments

Implement XHR using async i/o, either through EM or through ruby threads.

smparkes avatar Jan 28 '10 23:01 smparkes

I like it ! :)

What I did to solve that problem is a javascript XHR mocker. I define some urls which are mocked and no xhr request is made. Then I can get exactly the content I want and test it in my application.

The project is here : http://github.com/dmathieu/moqueur

dmathieu avatar Mar 29 '10 09:03 dmathieu

Cool.

Note that XHR works fine, in a limited sort of way. It's just that it's always sync, not async. Making it async is a challenge. Combing Ruby threads with SpiderMonkey is nye on to impossible.

smparkes avatar Mar 29 '10 17:03 smparkes