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

MIME type API: extensions #48

Open
annevk opened this issue Nov 28, 2017 · 3 comments
Open

MIME type API: extensions #48

annevk opened this issue Nov 28, 2017 · 3 comments

Comments

@annevk
Copy link
Member

annevk commented Nov 28, 2017

I'm sometimes reminded by Yehuda that exposing basic checks and constants the browser has is useful. So if #43 gets implemented we should consider exposing "XML MIME type", "JSON MIME type", "JavaScript MIME type", et al.

Given that sometimes this involves an "ends with" match on the subtype it doesn't seem like just exposing the array of MIME types is the way to go.

This leaves us with either static or instance methods. I don't have a strong opinion either way. If someone can find compelling precedents that'd be most welcome.

@annevk
Copy link
Member Author

annevk commented Nov 28, 2017

(The main reason I don't want to do this straight away is that I'm not sure the MIME type groups have really solidified yet.)

@jasnell
Copy link

jasnell commented Dec 4, 2017

I'd generally come down in favor off leaving this bit to userland. Yes, it can be useful but I don't see it as something critical for the base standard API.

@annevk
Copy link
Member Author

annevk commented Dec 5, 2017

The main reason is that browsers all have these lists/checks internally already and are therefore begging to be exposed in some manner. I'm happy to hold off on this though until all browsers and Node.js have shipped the basic API and we got some experience with that. No need to rush things especially given none of this has been exposed thus far (or cleaned up).

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

No branches or pull requests

2 participants