[whatwg] Storage Events for a Specific Storage Area
Jeremy Orlow
jorlow at chromium.org
Mon Jun 22 09:45:34 PDT 2009
Seems like a reasonable idea. I don't know if it's been brought up before.
My guess is that Ian will say this should be re-examined for HTML6, though.
J
On Fri, Jun 19, 2009 at 9:07 PM, Joseph Pecoraro <joepeck02 at gmail.com>wrote:
> It sounds like there wasn't any discussion on this. I recently heard talk
> of other potential Storage areas [2]. That would make this idea even more
> appealing to me. Does this sound like something worth adding? Any
> comments?
>
> [2]:
> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2009-June/020485.html
>
>
> On Jun 17, 2009, at 1: 44PM, Joseph Pecoraro wrote:
>
> The "storage" event [1] fires for both sessionStorage and localStorage.
>> To me, this means if you only want to interact with localStorage you will
>> have to manually ensure that it is the storage area being modified:
>>
>> window.addEventListener('storage', function(e) {
>> if ( e.storageArea === localStorage ) {
>> // ...
>> }
>> }
>>
>> Was there any discussion about creating events specific to the storage
>> object, or should that already be possible? I've been playing around with
>> WebKit's Storage implementation, and the following (understandably) is not
>> possible:
>>
>> > localStorage.addEventListener
>> undefined
>>
>> Is there any way to listen to events for a single specific storage area or
>> is the previously mentioned approach preferred?
>>
>> Cheers,
>> Joe
>>
>> [1]: http://dev.w3.org/html5/webstorage/#the-storage-event
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090622/ac40f19b/attachment-0002.htm>
More information about the whatwg
mailing list