Skip to content

Commit

Permalink
Fix: use 'fire an event' + drop BeforeInstallPromptEventInit
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Nov 10, 2016
1 parent 6a9d40e commit 35ce182
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -495,15 +494,10 @@ <h3>
<code>BeforeInstallPromptEvent</code> Interface
</h3>
<pre class="idl">
[Constructor(DOMString typeArg, optional BeforeInstallPromptEventInit eventInit)]
[Constructor]
interface BeforeInstallPromptEvent : Event {
Promise&lt;PromptResponseObject&gt; prompt();
};

dictionary BeforeInstallPromptEventInit : EventInit {
AppBannerPromptOutcome userChoice;
};

dictionary PromptResponseObject {
AppBannerPromptOutcome userChoice;
};
Expand Down

0 comments on commit 35ce182

Please sign in to comment.