WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
19111
Storage interface data should be removed when using delete
https://bugs.webkit.org/show_bug.cgi?id=19111
Summary
Storage interface data should be removed when using delete
Nicholas C. Zakas
Reported
2008-05-18 12:22:01 PDT
In sessionStorage, you should be able to remove data like this: delete sessionStorage.name; This doesn't work in WebKit, you using removeItem() works fine. The delete operator usage is supported in both Firefox 2+ and Internet Explorer 8.
Attachments
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2008-05-18 14:30:42 PDT
In hitting up the spec to see if it mentions the delete storage.property; syntax as an alias for removeItem(property), I see that the specific mentioning of enumeration and property matching in general has been stricken. I wonder when this happened?
Brady Eidson
Comment 2
2008-05-18 14:40:34 PDT
If we decide to fix this, there's no reason it will be SessionStorage-only - it will be all Storage interfaces
Brady Eidson
Comment 3
2008-05-18 15:20:57 PDT
I did a little exploring into some recent revisions of the spec and tracked down why the enumeration stuff was removed. I've emailed WHATWG about that omission and also to raise the point about the delete syntax -
http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2008-May/014848.html
In the meantime, I can't see the harm in supporting this...
Brady Eidson
Comment 4
2008-05-18 15:36:16 PDT
Hixie confirmed on IRC that the [XXX] placeholder in the storage interface is meant to imply delete support on removeItem(). I'm adding this now while I have a few free cycles
Brady Eidson
Comment 5
2008-05-18 16:52:45 PDT
Landed
r33565
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug