New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#463@minor: Added partial support for XMLHttpRequest. #520
#463@minor: Added partial support for XMLHttpRequest. #520
Conversation
…d anti-theft links.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job! 🙂 Found a small thing.
# Conflicts: # packages/happy-dom/src/exception/DOMExceptionNameEnum.ts # packages/happy-dom/src/window/Window.ts
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. |
…) and remove outdated annotation, fixes some typo error.
Hi, @daveed07, |
Yes I am planning to fix the last stuff as soon as possible 😊 |
Hey, @capricorn86. I think our current priority is to add test units. |
Hi! Yes I will try to find some time tonight 🙂 |
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? |
I started on adding mocking capabilities in |
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. |
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 🙂 |
Tasks
URL Parse Error #401
URL is missing searchParams #452
load scripts from web error #508
error in method getAbsoluteURL #514
URL Parser Error #521
add Referer when load web assets #522
Missing Document.documentURI and Document.URL #526
ReferenceError: XMLHttpRequest is not defined #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 a71819f
XMLHttpRequest
finished.
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