scala-js/scala-js-dom

Update available MIMEtypes

zetashift opened this issue · 5 comments

Our current list is quite small:

opaque type MIMEType <: String = String
object MIMEType {
val `text/html`: MIMEType = "text/html"
val `text/xml`: MIMEType = "text/xml"
val `application/xml`: MIMEType = "application/xml"
val `application/xhtml+xml`: MIMEType =
"application/xhtml+xml"
val `image/svg+xml`: MIMEType = "image/svg+xml"
}

For common MIME types I've found this: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types

I'm not sure if this is a worthwhile endeavour. We can never have a complete list, and it can become a PITA to maintain. Maybe we should just use String, and deprecate this.

Actually that appears to be a different API 😅

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/mimeTypes

oops, but you are still right tho!

There is no "will fix by deprecating it" label :P!