From 35ce182484dac897bf458dc90f3064ccaecb6ada Mon Sep 17 00:00:00 2001 From: Marcos Caceres <marcos@marcosc.com> Date: Thu, 10 Nov 2016 15:39:07 +1100 Subject: [PATCH] Fix: use 'fire an event' + drop BeforeInstallPromptEventInit --- index.html | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index 27bff131c..2b73276c1 100644 --- a/index.html +++ b/index.html @@ -399,18 +399,17 @@ <h2> <a>Queue a task</a> on the <a>application life-cycle task source</a> to do the following: <ol> - <li>Let <var>event</var> be a <a data-lt= - "construct a BeforeInstallPromptEvent">newly constructed</a> <a> - BeforeInstallPromptEvent</a> named - "<a>beforeinstallprompt</a>", which is cancelable. + <li>Let <var>target</var> be at <a>Window</a> object of the + <a>top-level browsing context</a>. </li> - <li> - <a>Fire</a> <var>event</var> at the <a>Window</a> object of the - <a>top-level browsing context</a>. + <li>Let <var>showPrompt</var> be the result of <a>firing an + event</a> (<var>event</var>) named "beforeinstallprompt", using + <a>BeforeInstallPromptEvent</a> at <var>target</var> with its + <code>cancelable</code> attribute initialized to true. </li> - <li>If <var>event</var>'s <a>canceled flag</a> is not set, then, - <a>in parallel</a>, <a>request to present an install prompt</a> - with <var>event</var>. + <li>If <var>showPrompt</var> is true, then, <a>in parallel</a>, + <a>request to present an install prompt</a> with + <var>event</var>. </li> </ol> </li> @@ -495,15 +494,10 @@ <h3> <code>BeforeInstallPromptEvent</code> Interface </h3> <pre class="idl"> - [Constructor(DOMString typeArg, optional BeforeInstallPromptEventInit eventInit)] + [Constructor] interface BeforeInstallPromptEvent : Event { Promise<PromptResponseObject> prompt(); }; - - dictionary BeforeInstallPromptEventInit : EventInit { - AppBannerPromptOutcome userChoice; - }; - dictionary PromptResponseObject { AppBannerPromptOutcome userChoice; };