scala-js-dom icon indicating copy to clipboard operation
scala-js-dom copied to clipboard

Update available MIMEtypes

Open zetashift opened this issue 2 years ago • 5 comments

Our current list is quite small: https://github.com/scala-js/scala-js-dom/blob/21d6badf500435b66f645e2114d9f623afc9415f/dom/src/main/scala-3/org/scalajs/dom/MIMEType.scala#L5-L15

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

zetashift avatar Jan 31 '23 17:01 zetashift

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.

armanbilge avatar Jan 31 '23 17:01 armanbilge

Fair enough, typescript does the same somewhat

https://github.com/microsoft/TypeScript/blob/7d1cc88a8cbdf8aa847a7f2a7d4bfeb89c8dde15/lib/lib.dom.d.ts#L9796

zetashift avatar Jan 31 '23 17:01 zetashift

Actually that appears to be a different API 😅

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

armanbilge avatar Jan 31 '23 18:01 armanbilge

oops, but you are still right tho!

zetashift avatar Jan 31 '23 18:01 zetashift

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

zetashift avatar Jan 31 '23 18:01 zetashift