Re: [push-api] Rewriting push event handling; allowing data to be optional. (#166)

>            </li>
> -          <li>
> -            <a>Queue a task</a> to <a data-lt="fire a simple event">fire <var>event</var> as a
> -            simple event</a> named <code>push</code> at <var>scope</var>.
> +          <li>Invoke the <a>Handle Functional Event</a> algorithm with a <a>service worker
> +          registration</a> of <var>registration</var> and <var>callbackSteps</var> set to the
> +          following steps:
> +            <ol>
> +              <li>Set <var>global</var> to the global object that was provided as an argument.
> +              </li>
> +              <li>Create a <a>trusted event</a>, <var>e</var>, that uses the
> +              <code><a>PushMessageEvent</a></code> interface, with the event type
> +              <code>push</code>, which does not bubble, is not cancelable, and has no default
> +              action.
> +              </li>
> +              <li>If the <a>push message</a> contains valid data, set the <code>data</code>

What does _valid data_ mean? I don't want to fire `onpush` for messages that have undecryptable payloads.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/push-api/pull/166/files#r42141059

Received on Thursday, 15 October 2015 15:42:39 UTC