Re: [w3c/manifest] Feat(events): add BeforeInstallPromptEvent (#520)

marcoscaceres commented on this pull request.



> +        </section>
+        <section>
+          <h4>
+            <code>prompt()</code> method
+          </h4>
+          <p>
+            The <dfn>prompt</dfn> method, when called, runs the following
+            steps:
+          </p>
+          <ol>
+            <li>Let <var>p</var> be a newly created promise.
+            </li>
+            <li>Run the following steps <a>in parallel</a>:
+              <ol>
+                <li>If <a>[[\promptOutcome]]</a> is not <code>null</code>,
+                resolve <var>p</var> with <a>[[\userResponsePromise]]</a> and

> Oh so your intention was specifically to not expose the internal promise? (i.e, every time you call prompt() it's a different promise?)

Yeah, I realized we could just do that after the discussion we had in the bug (the discussion about e.prompt() === e.prompt()). I think returning a new promise works nicely because in reality the internal promise just becomes an implementation detail. But it will be nice in the spec because it makes the behavior quite nice and clear, IMHO. 


-- 
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/520

Received on Wednesday, 9 November 2016 12:00:41 UTC