[whatwg] Storage Events for a Specific Storage Area

> Jeremy Orlow: Is it too late?  It seems as though Joseph's  
> suggestion could be in addition to what's already in the spec.

This doesn't break anything in the current spec.  So it wouldn't break  
any existing implementations.  I'm also guessing that the groundwork  
for implementing a feature like this is already in place due to the  
ubiquity of addEventListener.

Pros:

- Less Developer Confusion: When a web developer is focusing on a  
particular Storage area and set a "storage" listener, unless they  
check the storageArea they may not realize their listener is getting  
fired for scripts dealing with a different Storage area.  I'm not sure  
if this can be considered a "security" threat but it would certainly  
limit the potential for problems.
- Less Listener Functions Fired - Instead of every registered listener  
getting fired on every "storage" event, only those applicable will be  
fired.  This may mean overall less listeners getting fired, and code  
that doesn't have to continually check the affected storageArea,  
leading to potential performance improvements.

Cons:

- This is similar to implementing the full EventTarget Interface on  
Storage areas.  However, the only event of importance on a Storage  
area is "storage" not "click" or "hover" etc.  Invalid event types  
should probably throw an error or something... or maybe this is more  
in the scope of DOM Events.


> Anne: By the way, change requests for this specification should be  
> made to public-webapps at w3.org. localStorage and friends are no  
> longer part of HTML5.

I read from your (Anne's) blog that Web Storage has split off of  
HTML5, and I see it on the WebApps homepage [1] but the document  
itself said to send feedback to either mailing list or the bugzilla  
[2].  I just subscribed.  In the future I'll use the other list for  
whats on the WebApps homepage.

[1]: http://www.w3.org/2008/webapps/charter/
[2]: http://dev.w3.org/html5/webstorage/#status-of-this-document


- Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090623/8a821bf0/attachment.htm>

Received on Tuesday, 23 June 2009 10:51:18 UTC