1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-01-21 04:52:26 -05:00

add comments for the reference of image mimesniff

This commit is contained in:
Hajime-san 2024-09-21 15:59:14 +09:00
parent 825515e2cb
commit bd77fb92f1
2 changed files with 4 additions and 3 deletions

View file

@ -179,9 +179,6 @@ See: https://developer.mozilla.org/en-US/docs/Web/API/Blob/type\n",
}
// return an error if the MIME type is not supported in the variable list of ImageTypePatternTable below
// ext/web/01_mimesniff.js
//
// NOTE: Chromium supports AVIF
// https://source.chromium.org/chromium/chromium/src/+/ef3f4e4ed97079dc57861d1195fb2389483bc195:third_party/blink/renderer/platform/image-decoders/image_decoder.cc;l=311
x => {
return Err(
DOMExceptionInvalidStateError::new(

View file

@ -395,6 +395,10 @@ const ImageTypePatternTable = [
/**
* Ref: https://mimesniff.spec.whatwg.org/#image-type-pattern-matching-algorithm
* NOTE: Some browsers have implementation-defined image formats.
* For example, The AVIF image format is supported by all browsers today.
* However, the standardization seems to have hard going.
* See: https://github.com/whatwg/mimesniff/issues/143
* @param {Uint8Array} input
* @returns {string | undefined}
*/