happy-dom
happy-dom copied to clipboard
#463@minor: Added partial support for XMLHttpRequest.
Tasks
-
[x] #401
-
[x] #452
-
[x] #508
-
[x] #514
-
[x] #521
-
[x] #522
-
[x] #526
-
[ ] #463
-
URL & URLSearchParams we try to use
node:url
module solve problems about URL and URLSearchParams now. -
Document.URL & Document.documentURI I have implemented it in https://github.com/capricorn86/happy-dom/pull/520/commits/a71819f7bd813a3e0bc528f9fa8995a0896f52d7
-
XMLHttpRequest it is still implemented and does not support synchronization.
References: https://github.com/souldreamer/xhr2-cookies https://xhr.spec.whatwg.org/#xmlhttprequesteventtarget https://developer.mozilla.org/en-US/docs/Web/API/Document/URL https://dom.spec.whatwg.org/#dom-document-url https://github.com/jsdom/jsdom
Hi, @capricorn86, i need you give me some suggestions about https://github.com/capricorn86/happy-dom/issues/521#issuecomment-1166525271_
Hi, @capricorn86, i need you give me some suggestions about #521 (comment)_
Yes I think that is a good idea 👍 Hopefully it works the same way as in the browser.
Hi, @daveed07, Sorry, I've been too busy in the past few months. Thank you for your PR! It's looks like good, but there's still a lot of things we need to correct.
Hi, @daveed07, Sorry, I've been too busy in the past few months. Thank you for your PR! It's looks like good, but there's still a lot of things we need to correct.
Yes I am planning to fix the last stuff as soon as possible 😊
Hi, @daveed07, Sorry, I've been too busy in the past few months. Thank you for your PR! It's looks like good, but there's still a lot of things we need to correct.
Yes I am planning to fix the last stuff as soon as possible 😊
Couldn't be better! If you have settled anything, please let me know.
F**k, there's a lot of work to do...
~~redirect location BUGs~~
~~it's broken if redirect change protocol.~~
// redirect location
// 'http://www.baidu.com' -> 'https://www.baidu.com'
oReq.open("GET", "http://www.baidu.com/", true);
// ...
Fixed:https://github.com/capricorn86/happy-dom/pull/520/commits/d588d3baa7e87b5f6c2bfecf59ea817f1b932bf6
Hey, @capricorn86, I think we can change sync-request
to our sync XMLHttpRequest
now.
What do you suggest?
Hey, @capricorn86, I think we can change
sync-request
to our syncXMLHttpRequest
now. What do you suggest?
Yes, I also think so. Extract it to a utility, but it doesn't have to be done as part of this feature.
F**k, there's a lot of work to do...
~redirect location BUGs~
~it's broken if redirect change protocol.~
// redirect location // 'http://www.baidu.com' -> 'https://www.baidu.com' oReq.open("GET", "http://www.baidu.com/", true); // ...
Fixed:d588d3b
Yes I know :sweat_smile:
Hey, @capricorn86. I think our current priority is to add test units. But I failed to implement a local HTTP server, can you help me?
Hey, @capricorn86. I think our current priority is to add test units. But I failed to implement a local HTTP server, can you help me?
Hi! Yes I will try to find some time tonight :slightly_smiling_face:
Hey, @capricorn86. I think our current priority is to add test units. But I failed to implement a local HTTP server, can you help me?
Great work on the implementation. It seems like it is very soon ready :slightly_smiling_face:
Great work on the implementation. It seems like it is very soon ready 🙂
I have a question, when we use a synchronous request and use a child process to get the response, how do we mock it? All I can think of is getting a real http & https server in local...
Great work on the implementation. It seems like it is very soon ready 🙂
I have a question, when we use a synchronous request and use a child process to get the response, how do we mock it? All I can think of is getting a real http & https server in local...
I started on adding mocking capabilities in setup.js
yesterday. Will soon continue on actual tests.
I started on adding mocking capabilities in
setup.js
yesterday. Will soon continue on actual tests.
okey, I'm looking forward to it. 😄
@Mas0nShi I have managed to mock the Node.js packages and started to add some unit tests. I will continue as soon as I have some more time.
Is there any help I can provide to get this across the finish line? Mainly looking for the URL changes so I can do some web worker tests with vitest.
Is there any help I can provide to get this across the finish line? Mainly looking for the URL changes so I can do some web worker tests with vitest.
Hi @kalvenschraut!
It's a complicated feature, sorry that it takes such a long time.
It is starting to reach the end. It is just some more unit tests that has to be added to make sure that it is stable and will remain so.
@Mas0nShi I felt confident enough to merge this pull request now. Normally I would have liked if you got some more time to review, but many are waiting for it and there are many unit tests covering this. Feel free to review the code and check if something is missing 🙂
@kalvenschraut it has been merged now 🙂