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

marcoscaceres commented on this pull request.



> @@ -447,6 +447,170 @@ <h3 id="installation-sec">
         DOM events <a>fired</a> by this specification use the <dfn>application
         life-cycle task source</dfn>.
       </p>
+      <section data-dfn-for="BeforeInstallPromptEvent">
+        <h3>
+          <code>BeforeInstallPromptEvent</code> Interface
+        </h3>
+        <pre class="idl">
+          [Constructor(DOMString typeArg, optional BeforeInstallPromptEventInit eventInit)]
+          interface BeforeInstallPromptEvent : Event {
+              Promise&lt;UserResponseObject&gt; prompt();
+          };
+
+          dictionary BeforeInstallPromptEventInit : EventInit {
+            AppBannerPromptOutcome userChoice;

I feel pretty strongly about having the argument. I want a way of building these events from user-land in a way that allows .prompt() to resolve. It makes testing from user-land code much easier - and provides a complete solution, which also providing all the security assurances to the browser created events.  

-- 
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 Tuesday, 8 November 2016 08:22:40 UTC