Skip to content

Pass document's settings object when processing a manifest#12353

Merged
annevk merged 1 commit intowhatwg:mainfrom
marcoscaceres:manifest-client-parameter
May 2, 2026
Merged

Pass document's settings object when processing a manifest#12353
annevk merged 1 commit intowhatwg:mainfrom
marcoscaceres:manifest-client-parameter

Conversation

@marcoscaceres
Copy link
Copy Markdown
Member

@marcoscaceres marcoscaceres commented Apr 10, 2026

Pass document's relevant settings object when processing a manifest

The Web App Manifest spec's "processing a manifest" algorithm now accepts an optional environment settings object (client) parameter, used to set the request client when fetching manifest image resources. This enables CSP and service worker interception for those fetches.

This PR passes the link element's node document's relevant settings object as the client parameter when invoking "process the manifest".


  • At least two implementers are interested (and none opposed):
    • Chromium (already fetches through document frame via DownloadImageInFrame())
    • Gecko (already fetches via window.fetch() through content window with mode: "cors")
  • Tests are written and can be reviewed and commented upon at:
    • No observable behavior change for this PR alone (wires up a parameter). Tests for the end-to-end behavior (CSP applying to manifest icon fetches) tracked in w3c/manifest#1171.
  • Implementation bugs are filed:
    • Chromium: already conformant
    • Gecko: already conformant
    • WebKit: Bug 311872
    • Deno
    • Node.js
  • Corresponding HTML AAM & ARIA in HTML issues & PRs — N/A
  • MDN issue is filed — N/A, no developer-facing change
  • The top of this comment includes a clear commit message to use.

Context


💥 Error: Wattsi server error 💥

PR Preview failed to build. (Last tried on May 2, 2026, 3:11 PM UTC).

More

PR Preview relies on a number of web services to run. There seems to be an issue with the following one:

🚨 Wattsi Server - Wattsi Server is the web service used to build the WHATWG HTML spec.

🔗 Related URL

Error output:

      <!DOCTYPE html>
      <html>
      <head>
          <meta name="viewport" content="width=device-width, initial-scale=1">
          <meta name="robots" content="noindex">
          <style>body,html{height:100%;margin:0}body{display:flex;align-items:center;justify-content:center;flex-direction:column;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}p{text-align:center;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;color:#000;font-size:14px;margin-top:-50px}p.code{font-size:24px;font-weight:500;border-bottom:1px solid #e0e1e2;padding:0 20px 15px}p.text{margin:0}a,a:visited{color:#aaa}</style>
      </head>
      <body>
      <p class="code">
        Error code: 503      </p>
      <p class="text">
        Well, This is unexpected. An Error has occurred, and we are working to fix the problem! We will be up and running shortly. Try refreshing the page or try again in a few minutes.
      </p>
        <div style="display:none;">
          <h1>
    upstream_reset_before_response_started{connection_termination} (503 UC)      </h1>
          <p data-translate="connection_timed_out">App Platform failed to forward this request to the application.</p>
      </div>
      </body>
      </html>
    

This seems to be an issue with the Wattsi Server service. PR Preview doesn't manage this service and so has no control over it. If you've identified an issue with it, you can report the issue to the maintainers of Wattsi Server directly. Please be courteous. Thank you!

If you don't have enough information above to solve the error by yourself or if the issue doesn't seem related to Wattsi Server, you can file an issue with PR Preview.

The Web App Manifest spec's "processing a manifest" algorithm now
accepts an optional environment settings object (client) parameter,
used to set the request client when fetching manifest image resources.
This enables CSP and service worker interception for those fetches.

Pass the link element's node document's relevant settings object as
the client parameter when invoking "process the manifest".

See: w3c/manifest#1171
See: w3c/image-resource#50
@marcoscaceres marcoscaceres requested a review from annevk April 10, 2026 06:01
@marcoscaceres
Copy link
Copy Markdown
Member Author

@dmurph, do you want to check this too from the Chromium side?

@dmurph
Copy link
Copy Markdown

dmurph commented May 1, 2026

This looks correct to me, we download from the frame's context.

@marcoscaceres
Copy link
Copy Markdown
Member Author

@annevk anything missing or anything you would like us to do?

@annevk annevk merged commit f4b0470 into whatwg:main May 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants