-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
What is the issue with the HTML Standard?
match-preload-type section says these are supported destinations:
destination is "audio" or "video", and mimeTypeRecord is an audio or video MIME type;
destination is a script-like destination and mimeTypeRecord is a JavaScript MIME type;
destination is "image" and mimeTypeRecord is an image MIME type;
destination is "font" and mimeTypeRecord is a font MIME type;
destination is "json" and mimeTypeRecord is a JSON MIME type;
destination is "style" and mimeTypeRecord's essence is text/css; or
destination is "track" and mimeTypeRecord's essence is text/vtt,
And translate a preload destination says these types are supported:
"fetch", "font", "image", "script", "style", or "track"
The preload algorithm processes "translate a preload destination" first, and early-returns if there's no match. So the extra "audio", "video", and other script-like destinations (audioworklet, etc) from "match preload type" are unreachable in the current algorithm. Also, "fetch" is missing from "match a preload type", but I don't believe there's any type associated with "fetch", so this might be fine.
I don't believe any browser supports these extra types, so it might be worth going with the more limited list from "translate a preload destination".