You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In #10212, preload for json modules is disallowed in <link rel=preload>. (Which will use rel=modulepreload in #10233)
However, should there be an event handler (either 'error' or 'load') to indicate this <link> has been processed?
In current spec, the translate a preload destination will return null for "json",
which will make the preload will have a null request and return in step 4.
If request is null, then return.
Then back to the caller, fetch and process the link resource,
the preload in step 3 doesn't call the processResponse because it bailed out early, so neither the event handler 'error' nor 'load' will be called.
Is this behavior correct?
As the wpt preload-type-match.html expects the 'load' handler for <link rel=preload as=json> will be called.
It looks like there's a bug either in the HTML spec or in the WPT.
I believe that this is an implementation/WPT bug... The preload spec was written after implementations so there were several of these mismatches around. This specific test was more about content-types, it's probably an oversight and those as values should have been fetch
Thanks for the clarification, @noamr.
Also, I am wondering, should an event handler be called for the case as=json?
Before #10212, the preload will reach fetch, see step 11 of preload
so a handler will be called.
Now with #10212 landed, it will return early since the request is null, but the operation just returns silently without providing any information about the link element with as=json, isn't this also an issue?
What is the issue with the HTML Standard?
In #10212, preload for json modules is disallowed in
<link rel=preload>
. (Which will use rel=modulepreload in #10233)However, should there be an event handler (either 'error' or 'load') to indicate this
<link>
has been processed?In current spec, the translate a preload destination will return null for "json",
which will make the preload will have a null request and return in step 4.
Then back to the caller, fetch and process the link resource,
the preload in step 3 doesn't call the processResponse because it bailed out early, so neither the event handler 'error' nor 'load' will be called.
Is this behavior correct?
As the wpt preload-type-match.html expects the 'load' handler for
<link rel=preload as=json>
will be called.It looks like there's a bug either in the HTML spec or in the WPT.
CCing @noamr
The text was updated successfully, but these errors were encountered: