Re: [whatwg] Notifications: associating state

On Aug 30, 2013 7:47 AM, "Anne van Kesteren" <annevk@annevk.nl> wrote:
>
> Having Notification.get() makes associating state more desirable, but
> even in its absence we have requests to store arbitrary state on
> Notifications object. We could have a mechanism similar to pushState()
> to store such state.
>
> It's kinda similar to having data-* on elements.
>
> My main worry is that we'll end up with many parallel communication
> channels, but given that the complexity seems relatively low that
> might not necessarily be bad.

It seems more like additional parallel storage mechanisms to me.

I agree that we are introducing additional ones of those. But if we compare
to other APIs in other platforms, it is common to allow passing closures
that are passed back with callbacks. More common than allowing identifiers
to be passed in which then require the callback to use the identifier to
look up data in a separate storage mechanism.

/ Jonas

Received on Friday, 30 August 2013 18:53:01 UTC