Skip to content

Clarify applying manifest to an existing browsing context#1202

Merged
dmurph merged 4 commits intomainfrom
out-of-scope-linking
Apr 9, 2026
Merged

Clarify applying manifest to an existing browsing context#1202
dmurph merged 4 commits intomainfrom
out-of-scope-linking

Conversation

@christianliebel
Copy link
Copy Markdown
Member

@christianliebel christianliebel commented Jan 29, 2026

Closes #784

This change:

  • Adds new normative requirements

Adds normative text to the Applying the manifest section covering the case where a user agent applies a manifest to an existing top-level browsing context (e.g., immediately after installation). The two cases are now specified:

  • If the active document's URL is within scope: the browsing context becomes an application context.
  • If the active document's URL is not within scope: the behavior is implementation-defined.

An informative note illustrates the implementation-defined case (e.g., Chromium's tab-promotion behavior).

The original note added by this PR has been moved from the navigation scope section to sit adjacent to the new normative text, and revised for consistency (replacing [=launch=] with [=apply=], which correctly describes applying to an existing context rather than creating a new one).

Implementation commitment: no implementation changes required — the normative text formalizes existing behavior and explicitly leaves the out-of-scope case as implementation-defined.

Commit message:

Add normative text for applying manifest to existing browsing context


Preview | Diff

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds an editorial note documenting user agent behavior when launching an installed web application from the browsing context that initiated installation, specifically addressing the case where that context's URL is outside the manifest's scope. This addresses part of issue #784 regarding clarification of manifest behavior with out-of-scope pages.

Changes:

  • Adds a non-normative note in the navigation scope section describing potential user agent behavior when launching installed apps from out-of-scope URLs

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread index.html Outdated
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@dmurph dmurph left a comment

Choose a reason for hiding this comment

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

LGTM

Comment thread index.html Outdated
Comment thread index.html Outdated
Comment thread index.html Outdated
@marcoscaceres
Copy link
Copy Markdown
Member

After discussion with @marcoscaceres, we think this PR's note needs to be paired with normative text, and the note itself revised to be consistent with it.

Proposed normative text

Add the following to the "Applying the manifest" section, after the sentence "the user agent MAY [=apply=] a manifest to it before [=navigate|navigation=] begins":

<p>
  A user agent MAY also [=apply=] a manifest to an existing [=top-level
  browsing context=]. If the [=navigable/active document=]'s
  [=Document/URL=] is [=manifest/within scope=] of the manifest, the
  existing [=top-level browsing context=] becomes an [=application
  context=]. If the [=Document/URL=] is not [=manifest/within scope=],
  the resulting behavior is implementation-defined.
</p>

Revised note

Replace the current <aside> added by this PR with the following (and move it to sit directly after the normative text above):

<aside class="note">
  <p>
    Some user agents might [=apply=] a manifest to the existing
    [=top-level browsing context=] from which installation was
    initiated. If the [=navigable/active document=]'s [=Document/URL=]
    is not [=manifest/within scope=] of the manifest's
    [=manifest/navigation scope=], one possible behavior is that the
    [=application context=] initially exists at an out-of-scope
    [=Document/URL=].
  </p>
</aside>

Rationale

  • The note previously used [=launch=], which per the spec creates a new application context — inconsistent with describing the existing-tab-promotion case.
  • The normative text clarifies both branches: in-scope (browsing context becomes an application context) and out-of-scope (implementation-defined).
  • Together they close Clarify behaviour of a page linking to a manifest that is not within scope of that manifest #784 properly: the informative note illustrates one concrete instance of the implementation-defined behavior.

When a UA applies a manifest to an existing top-level browsing context
(e.g. immediately after installation), the spec now normatively covers
both cases: in-scope (context becomes an application context) and
out-of-scope (behavior is implementation-defined).

Moves the informative note to sit adjacent to the normative text and
revises it to be consistent: replaces "launch" (which creates a new
context) with "apply", and frames the out-of-scope outcome as one
possible implementation-defined behavior.

Closes #784
@marcoscaceres marcoscaceres changed the title Editorial: add a note on out-of-scope manifest linking behavior Clarify applying manifest to an existing browsing context Apr 9, 2026
Copy link
Copy Markdown
Member

@marcoscaceres marcoscaceres left a comment

Choose a reason for hiding this comment

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

LGTM! Nice one.

@marcoscaceres marcoscaceres requested a review from dmurph April 9, 2026 13:38
@christianliebel
Copy link
Copy Markdown
Member Author

@dmurph @saschanaz Could you please review this change? It should align with the installation behavior of Chromium and Gecko. We wanted to clarify this in the spec to address #784.

Copy link
Copy Markdown
Collaborator

@dmurph dmurph left a comment

Choose a reason for hiding this comment

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

LGTM

@dmurph
Copy link
Copy Markdown
Collaborator

dmurph commented Apr 9, 2026

@saschanaz Given that there is alignment between webkit and chromium folks here I'm going to approve & merge to keep velocity up (as we meet to chat about this stuff infrequently)

However! This should also come with the understanding that we should revert if there are other issues or objections where we have made mistakes. So please let us know if you have feedback that we can continue iterating on or revert this change.

@dmurph dmurph merged commit c5b38d2 into main Apr 9, 2026
2 checks passed
github-actions Bot added a commit that referenced this pull request Apr 9, 2026
SHA: c5b38d2
Reason: push, by dmurph

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@marcoscaceres marcoscaceres deleted the out-of-scope-linking branch April 11, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify behaviour of a page linking to a manifest that is not within scope of that manifest

4 participants