Re: [w3c/manifest] Adding file_handlers and launch consumer (#1005)

@alancutter commented on this pull request.



> +    </section>
+    <section data-cite="file-system-access">
+      <h2>
+        <dfn>Execute a file handler launch</dfn>
+      </h2>
+      <p>
+        A {{Window/window}} has an associated {{LaunchConsumer}} <dfn>assigned
+        launch consumer</dfn>.
+      </p>
+      <p>
+        A {{Window/window}} has an associated [=list=] of {{LaunchParams}}
+        <dfn>unconsumed launch params</dfn>.
+      </p>
+      <p>
+        When a [=file type=] is registered with a web app and one or more of
+        these registered files are launched on the platform, run the following

Thanks for the @, this proposed "re enqueue `LaunchParams` on in scope navigation" is much less ideal with Launch Handler's [proposed behaviour](https://github.com/WICG/sw-launch/blob/main/launch_handler.md#launchqueue-and-launchparams-interfaces).

> Whenever a web app is launched (via any launch trigger) a `LaunchParams` object will be enqueued in the `launchQueue` global `LaunchQueue` instance for the browsing context that handled the launch.

If it's not possible to distinguish redirects from user navigations then we should give the act of forwarding `LaunchParams` to redirect URLs an explicit API e.g.
```js
launchQueue.setConsumer(params => {
  if (needsFancyEditor(params.files)) {
    params.redirectTo(fancyEditorUrl); // Must be in web app scope.
  }
});
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/manifest/pull/1005#discussion_r737265215

Received on Wednesday, 27 October 2021 09:10:36 UTC