Closed wisniewskit closed 4 years ago
Additional context in #43
Aside from Blob
, this also affects slice()
and File
.
I think what should happen is that we store a MIME type internally (I think @mkruisselbrink was planning on adding internal slots) and the type
getter serializes it using https://mimesniff.spec.whatwg.org/#serialize-a-mime-type.
I looked into writing a patch for this briefly, but it would end up being quite the rewrite as these bits of the specification are quite dated.
Note that there's tests for this already at /mimesniff/mime-types/parsing.any.js
so this is mainly about updating the specification as also discussed at https://github.com/w3c/FileAPI/issues/43#issuecomment-347775858.
Let's duplicate this into that issue as there's no real need to track it separately.
While working on Gecko's Fetch compliance, I noted that there are web platform tests which fail because they expect blob types to be passed through the MIME Sniffing standard's serialization. @annevk suggested that there may have been discussions on doing this reserialization, so I'm filing a bug to verify that option.