-
Notifications
You must be signed in to change notification settings - Fork 160
-
Notifications
You must be signed in to change notification settings - Fork 160
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
Clarfiy behavior of <link rel=manifest media> #186
Comments
We should ignore media attribute such as rel='icon' do. It's a footgun. And we want the manifest to be a unique way to describe a web app. Having media being applied would be crazy. |
It wouldn't be crazy, it would just be kinda weird (but that's ok). Of the behavior is already specified to work out of the box with |
@marcoscaceres Wouldn't that be like restricting bookmarking of a page depending on the media type http://www.w3.org/TR/CSS21/media.html#media-types and media features http://www.w3.org/TR/css3-mediaqueries/#media1? Seems a bit weird indeed, and I have hard time figuring out a good use case. Given we only support a single
|
So, we've banned For the record: I still don't think we should be screwing with the semantic/behavior of elements. Creating special cases leads to unpredictability and inconsistency in the platform. Banning things that we get for "free" (by virtue that they are explicit in the definition of the I'd really like to get a bit more input here from people like @Hixie, @darobin, @hsivonen before we ship anything. |
See also: #188 (comment) |
Just noting that the strongest case for banning |
Wait why would you ban the events? That seems wrong. |
@annevk I'll preface this comment by stating that I think we should fire the events and keep consistency with HTML. I think @mounirlamouri's rationale is that some user agents may only load the resource when needed (when a user presses "add to homescreen") while other user agents may apply it dynamically at some point in time (even in the background without loading any HTML documents at all, in case of applications synching across devices). IIUC, there would not be any certainty across UAs about when the event would fire - leading to unreliable behavior for devs. Personally, I don't see this as a problem (as it might be the same as with stylesheets that match on particular media - and likely on particular user agents). The other argument is that there is not a strong use case for firing the event: what would devs do with it? |
They could detect it being used, for instance. I'm not sure what the rationale was for style sheets, but I'm not sure why it would not apply to this. |
Just a thought: if we are looking at special-casing the behavior of |
I've been talking to Marcos about the downsides of using the link element for this purpose for a while, and here's a summary of my thoughts so far on this issue.
It seems to me like at this point perhaps we should reconsider whether link is the right element for this job, since it seems to me like we're spending more time making the existing semantics of the link element adapt to this case than the potential benefit we'd get out of reusing this element. Here's a strawman counter proposal: how about we use an attribute on the document element (name to be bikeshedded) to point to a URL where the manifest can be found? |
Edit: On second thought, given the quite media-specific content of the manifest, then the media attribute should very much be honoured. You might want |
@stain, we are hoping to cover that in #168. That is, so authors can just create one manifest rather than putting this in the HTML. Doing so would allow manifests to be sync across multiple devices. So like: {
"orientation": "any",
"@media tv": {
"display": "fullscreen",
"orientation": "landscape"
},
"@media handheld": {
"display": "standalone",
"orientation": "portrait"
}
} |
(apologies for the double post - Fx Nightly crashed on me when I commented the first time... yet it managed to post my reply!) |
Some of @ehsan's points (in particular CORS and media="") apply to HTML imports. It's not a problem there. We can decided based on the relation what type of fetch to initiate and whether to ignore media. Multiple manifest links seems more annoying. Is there a future where that would make sense? The events don't seem that problematic to me. |
@annevk we were not able to come up with a use case for multiple So, screw it, I'm just going to copy what HTML imports does (including firing the events). Note, that HTML Imports doesn't seem to deal with the So, the fetch request's mode will be CORS; and the ommit credentials will be "always" unless the |
* Formalizes using link element as the solution (closes #17) * Banned media attribute. At least, we say that it's not considered during processing. (closes #186) * Added text about when events need to be fired (closes #188) * The fetch part of the specification now mentions the crossorigin attribute (closes #195) * fixed copy/pasta error relating to icons/orientation (closes #198) * fixed a whole bunch of editorial issues.
I'm happy with this. Thanks a lot, Marcos! :-) |
What is the expected behavior when there is a media attribute present? Should it be ignored?
The text was updated successfully, but these errors were encountered: