Re: [w3c/manifest] Add `navigator.install()` (PR #1175)

@marcoscaceres commented on this pull request.



> +          <li>If |document| is not [=Document/fully active=], return [=a
+          promise rejected with=] an {{"InvalidStateError"}} {{DOMException}}.
+          </li><!-- todo: permission policy? -->
+          <li>If [=this=].{{Navigator/[[installPromise]]}} is not `null`,
+          return [=a promise rejected with=] an {{"InvalidStateError"}}
+          {{DOMException}}.
+          </li>
+          <li>If |global| does not have [=transient activation=], return [=a
+          promise rejected with=] a {{"NotAllowedError"}} {{DOMException}}.
+          </li>
+          <li>[=Consume user activation=] of |global|.
+          </li>
+          <li>Set [=this=].{{Navigator/[[installPromise]]}} to be <a>a new
+          promise</a>.
+          </li>
+          <li>Return [=this=].{{Navigator/[[installPromise]]}} and <a>in

I think we have a race condition here. The manifest may already be getting processed for other reasons. 

I think the only thing this can really do is present the install prompt. That install prompt gets asynchronously populated by the manifest (in parallel).  

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

Message ID: <w3c/manifest/pull/1175/review/2948862821@github.com>

Received on Monday, 23 June 2025 06:49:40 UTC