Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only preload resources with matching type/as attributes#7851

Merged
merged 6 commits into from
Apr 26, 2022

Conversation

noamr
Copy link
Contributor

@noamr noamr commented Apr 24, 2022

Closes w3c/preload#113

(See WHATWG Working Mode: Changes for more details.)


/infrastructure.html ( diff )
/links.html ( diff )
/semantics.html ( diff )

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch

source Show resolved Hide resolved
source Show resolved Hide resolved
source Show resolved Hide resolved

<ul class="brief">
<li><p><var>destination</var> is <code data-x="">audio</code> or <code data-x="">video</code>,
and <var>mimeTypeRecord</var> is an <span>audio or video MIME type</span></p></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We allow using as=audio type=video/blah?? That's a bit surprising... is it tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's expected since audio elements can play video tracks and vice versa.
I wasn't able to test media preloading reliably yet though, due to range responses, regardless of type verification.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would feel more comfortable merging this if we had some confirmation (e.g. by codebase inspection or via @annevk testimony, if we can't manage WPTs) that this was the desired behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I inspected the Chromium and WebKit code bases and this is based on that inspection.

source Show resolved Hide resolved
source Outdated Show resolved Hide resolved
source Show resolved Hide resolved
@domenic domenic merged commit c795467 into whatwg:main Apr 26, 2022
@noamr noamr deleted the preload-type branch April 26, 2022 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Parsable MIME type is going away
2 participants