Skip to content
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

Add Promise<Document> document() to Response #1124

Closed
dead-claudia opened this issue Dec 8, 2020 · 2 comments
Closed

Add Promise<Document> document() to Response #1124

dead-claudia opened this issue Dec 8, 2020 · 2 comments

Comments

@dead-claudia
Copy link

This one method would bring fetch to full parity with XHR regarding response types, and it'd be very useful for leveraging browsers' streaming parsers when fetching HTML to eventually either parse out (in user scripts) or display (in web pages). It wouldn't stream to the UI itself, however. In spirit, it'd mimic the "set a document response" algorithm for XHRs, and it'd likewise derive the MIME type from the response headers (specifically response.headers.get('content-type')).

@domenic
Copy link
Member

domenic commented Dec 8, 2020

Dupe of #16 and its dupes.

@dead-claudia
Copy link
Author

👍

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

No branches or pull requests

2 participants