Skip to content

Get Document object from the Response of fetch API #462

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

Closed
horo-t opened this issue Sep 17, 2014 · 4 comments
Closed

Get Document object from the Response of fetch API #462

horo-t opened this issue Sep 17, 2014 · 4 comments

Comments

@horo-t
Copy link
Member

horo-t commented Sep 17, 2014

We can get Document object using XMLHttpRequest by setting responseType='document'.
But we can't get Document object from the Response object of fetch API.

Is there any plan to support this?

@annevk
Copy link
Member

annevk commented Sep 17, 2014

No. We don't want to depend on HTML or XML from the "Fetch module".

@horo-t
Copy link
Member Author

horo-t commented Sep 17, 2014

I think it is good for performance to support parsing DOM while receiving new data.
XMLHttpRequest can do so.

Can we do so by passing the Response object to the Document object?

@annevk
Copy link
Member

annevk commented Sep 18, 2014

I don't necessarily disagree. The idea was to introduce asynchronous parser APIs. I think it would be convenient if those supported Request/Response-like objects.

@jakearchibald
Copy link
Contributor

Closing this as it was answered in whatwg/fetch#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants