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

Processing the manifest is no longer a function of document URL #834

Closed
wants to merge 12 commits into from
20 changes: 17 additions & 3 deletions index.html
Expand Up @@ -295,16 +295,30 @@ <h2>
<li>Fall back to using the <a>top-level browsing context</a>
{{Document}}'s metadata to populate <var>manifest</var> in a
user-agent-specific way (e.g., setting
|manifest|["{{WebAppManifest/name}}"] to the document [^title^])
and considering the document <a>installable</a>.
|manifest|["{{WebAppManifest/name}}"] to the document [^title^]),
including setting |manifest|["{{WebAppManifest/start_url}}"] to the
{{Document}}'s {{Document/URL}}, and
|manifest|["{{WebAppManifest/scope}}"] to the result of [=URL
Parser|parsing=] "." using the {{Document}}'s {{Document/URL}} as
the |base URL|, then considering the document <a>installable</a>.
</li>
<li>Or, consider the document not <a>installable</a>.
</li>
</ul>
</li>
<li>Otherwise, if |manifest|["{{WebAppManifest/start_url}}"] is not
present, or not <a>same origin</a> as the {{Document}}'s
{{Document/URL}}, consider the document not <a>installable</a>.
{{Document/URL}}, the user agent MAY either:
<ul>
<li>Set |manifest|["{{WebAppManifest/start_url}}"] to the
{{Document}}'s {{Document/URL}}, and set
|manifest|["{{WebAppManifest/scope}}"] to the result of [=URL
Parser|parsing=] "." using the {{Document}}'s {{Document/URL}} as
the |base URL|, and consider the document <a>installable</a>.
</li>
<li>Or, consider the document not <a>installable</a>.
</li>
</ul>
</li>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is "in scope of a URL" defined? What does that mean for document URL https://example.com/a/b/c/page.html? That the start_url must have that as a prefix?

Copy link
Collaborator

Choose a reason for hiding this comment

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

There's a section in the navigation-scope section of the spec defining in scope. https://www.w3.org/TR/appmanifest/#navigation-scope

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, that behaviour doesn't sound appropriate here. Would be good to have test cases for this (input -> output examples).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops. It's been awhile since I wrote this so I'm not sure what my intention was, but I suspect this was simply a mistake. It should have said "not same origin as", not "not within scope of".

That matches the existing check (which I'm removing), that would check if start_url was same origin as the document URL, and if not, ignore the supplied start_url and default to the document URL. Only now, we just consider it non-installable.

Does that sound right?

Copy link
Contributor

Choose a reason for hiding this comment

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

That sounds right.

<li>Otherwise, at its discretion, the user agent MAY consider the
{{Document}} <a>installable</a> (see [[[#installability-signals]]]).
Expand Down