[whatwg] Notifications: associating state

Jonas Sicking jonas at sicking.cc
Fri Aug 30 11:52:30 PDT 2013


On Aug 30, 2013 7:47 AM, "Anne van Kesteren" <annevk at 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



More information about the whatwg mailing list