Re: [w3c/push-api] Restructure the `push` event (#237)

beverloo commented on this pull request.



> +                    </li>
+                    <li>Discard the <a>push message</a>.
+                    </li>
+                    <li>Terminate this process.
+                    </li>
+                  </ol>A <code>push</code> event MUST NOT be fired for a <a>push message</a> that was
+                  not successfully decrypted using the key pair associated with the <a>push
+                  subscription</a>.
+                </li>
+                <li>Let <var>data</var> be a new <a>PushMessageData</a> instance with the decrypted
+                plain text of the <a>push message</a>.
+                </li>
+              </ol>
+            </li>
+            <li><a>Fire the push event</a> with <var>registration</var> and <var>data</var>, and
+            set <var>event</var> to the returned <a>trusted event</a>.

^^^ I removed the `If the push message contains valid data...` phrasing here since `data` would be `null` if it doesn't.

-- 
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/push-api/pull/237#pullrequestreview-22567520

Received on Friday, 17 February 2017 19:00:57 UTC