Skip to content

Commit 51ab9b9

Browse files
committed
deploy: 5455001
1 parent c49d3fd commit 51ab9b9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

index.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<meta content="Bikeshed version 742f3d674, updated Mon Nov 4 14:56:54 2024 -0800" name="generator">
99
<link href="https://www.w3.org/TR/design-principles/" rel="canonical">
1010
<link href="https://www.w3.org/2008/site/images/favicon.ico" rel="icon">
11-
<meta content="c4477d4d6cf137f726a6bc07a6202b89c785d64e" name="revision">
11+
<meta content="5455001904c64cc6986c4b1d35a0b3424c9ab736" name="revision">
1212
<meta content="dark light" name="color-scheme">
1313
<link href="https://www.w3.org/StyleSheets/TR/2021/dark.css" media="(prefers-color-scheme: dark)" rel="stylesheet" type="text/css">
1414
<style>
@@ -3153,8 +3153,9 @@ <h3 class="heading settled" data-level="10.4" id="new-data-formats"><span class=
31533153
<p>Always define a corresponding MIME type and extend existing APIs to support this type
31543154
for any new data format.</p>
31553155
<p>There are cases when a new capability on the web involves adding a new data format.
3156-
This can be an image, video, audio, or any other type of data that a browser is expected
3157-
to ingest. New formats should have a standardized MIME type, which is strictly validated.</p>
3156+
This can be an image, video, audio, text, or any other type of data that a browser is
3157+
expected to ingest. Use a strictly validated standardized MIME type for new formats.
3158+
New formats containing text should only support UTF-8 encoded text.</p>
31583159
<p>While legacy media formats do not always have strict enforcement for MIME types (and
31593160
sometimes rely on peeking at headers, to workaround this), this is mostly for legacy
31603161
compatibility reasons and should not be expected or implemented for new formats.</p>
@@ -3164,8 +3165,7 @@ <h3 class="heading settled" data-level="10.4" id="new-data-formats"><span class=
31643165
<p>For example. if you are to add an image format to the web platform, first add a new MIME
31653166
type for the format. After this, you would naturally add a decoder (and presumably an
31663167
encoder) for said image format to support decoding in HTMLImageElements. On top of this,
3167-
you are also expected to add support to egress points such as HTMLCanvasElement.toBlob()
3168-
and HTMLCanvasElement.toDataURL().</p>
3168+
you are also expected to add support to egress points such as <code>HTMLCanvasElement.toBlob()</code> and <code>HTMLCanvasElement.toDataURL()</code>.</p>
31693169
<p>For legacy reasons browsers support MIME type sniffing, but we do not recommend extending
31703170
the <a href="https://mimesniff.spec.whatwg.org/#image-type-pattern-matching-algorithm">pattern matching algorithm</a>,
31713171
due to security implications, and instead recommend enforcing strict MIME types for newer formats.</p>

0 commit comments

Comments
 (0)