Skip to content

Commit

Permalink
Branch: replace-launch-algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
alancutter committed Oct 28, 2022
1 parent 036bada commit 247d174
Showing 1 changed file with 24 additions and 33 deletions.
57 changes: 24 additions & 33 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -284,46 +284,37 @@ <h2>
</h2>
<section>
<h2>
Launching a Web App
Launching a Web App with Handling
</h2>
<p>
When launching a web app via any means the trigger of the launch
should run the steps to [=launch a web app=] with a {{LaunchParams}}
containing relevant launch information (e.g. share data in the event
of a share target launch).
This specification amends the existing algorithm to
<a data-cite="appmanifest#dfn-launch-a-web-application">launch a web
application</a> to include the behavior of [=manifest/launch_handler=]
by replacing it with the steps to [=launch a web app with handling=].
</p>
<p class="note">
Examples of different web app launch triggers:
</p>
<ul class="note">
<!--
This should be part of the <p> above but class="note"s don't agree
with nested <ul>s and will kick them out of the note box.
-->
<li>OS application launch surfaces
</li>
<li><a href="https://wicg.github.io/manifest-incubations/index.html#protocol_handlers-member">Protocol handling</a>
</li>
<li><a href="https://wicg.github.io/manifest-incubations/index.html#file_handlers-member">File handling</a>
</li>
<li><a href="https://wicg.github.io/manifest-incubations/index.html#share_target-member">Share target</a>
</li>
<li>Link capturing
</li>
</ul>
<p>
The steps to <dfn>launch a web app</dfn> are given by the following
algorithm and takes an optional {{LaunchParams}}
|params:LaunchParams|.
The steps to <dfn>launch a web app with handling</dfn> are given by
the following algorithm. The algorithm takes a
<a data-cite="appmanifest#dfn-processed-manifest">processed manifest</a>
|manifest:processed manifest|,
an optional |target URL:URL| or {{LaunchParams}}
|params:LaunchParams|, and returns a
[=service worker client/window client=].
</p>
<ol class="algorithm">
<li>If |params| is null, set |params| to a new {{LaunchParams}} with
{{LaunchParams/targetURL}} set to [=manifest/start_url=].
</li>
<li>If |params| is null:
<ol>
<li>If |target URL| is null, set |target URL| to
|manifest|.[=manifest/start_url=]
</li>
<li>Set |params| to a new {{LaunchParams}} with
{{LaunchParams/targetURL}} set to |target URL|.
</li>
</ol>
</li>
<li>Set |client| to the result of running the steps to
[=prepare a web app launch client=] passing the web app's
<a data-cite="appmanifest#dfn-processed-manifest">processed
manifest</a> and |params|.{{LaunchParams/targetURL}}.
[=prepare a web app launch client=] passing |manifest| and
|params|.{{LaunchParams/targetURL}}.
</li>
<li>Append |params| to the [=unconsumed launch params=] of the
|client|'s document's {{Window/launchQueue}}.
Expand Down

0 comments on commit 247d174

Please sign in to comment.