Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1049)

Unified Diff: third_party/WebKit/Source/modules/storage/Storage.idl

Issue 1498823002: Sync the Storage API with the spec (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/storage/StorageEvent.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/storage/Storage.idl
diff --git a/third_party/WebKit/Source/modules/storage/Storage.idl b/third_party/WebKit/Source/modules/storage/Storage.idl
index 63f4d5aac0a6691a4e0e4058cf8a1c7263684e63..d97213777b1d09c4b51125c2f7fd507af1ad894e 100644
--- a/third_party/WebKit/Source/modules/storage/Storage.idl
+++ b/third_party/WebKit/Source/modules/storage/Storage.idl
@@ -23,21 +23,26 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+// https://html.spec.whatwg.org/multipage/webstorage.html#the-storage-interface
+
[
GarbageCollected
] interface Storage {
- [NotEnumerable, RaisesException] getter DOMString (unsigned long index);
- [RaisesException] setter DOMString (unsigned long index, DOMString value);
- [RaisesException] deleter boolean (unsigned long index);
-
- [RaisesException] getter DOMString (DOMString name);
- [RaisesException] setter DOMString (DOMString name, DOMString value);
- [RaisesException] deleter boolean (DOMString name);
-
+ // TODO(philipj): [NotEnumerable] should not be used anywhere in this interface.
[NotEnumerable, RaisesException=Getter] readonly attribute unsigned long length;
[NotEnumerable, RaisesException] DOMString? key(unsigned long index);
[LogActivity, NotEnumerable, RaisesException] DOMString? getItem(DOMString key);
- [LogActivity, NotEnumerable, RaisesException] void setItem(DOMString key, DOMString data);
+ [LogActivity, NotEnumerable, RaisesException] void setItem(DOMString key, DOMString value);
[LogActivity, NotEnumerable, RaisesException] void removeItem(DOMString key);
[LogActivity, NotEnumerable, RaisesException] void clear();
+
+ // TODO(philipj): Merge these into getItem/setItem/removeItem.
+ [RaisesException] getter DOMString (DOMString name);
+ [RaisesException] setter DOMString (DOMString name, DOMString value);
+ [RaisesException] deleter boolean (DOMString name);
+
+ // Non-standard APIs
+ [NotEnumerable, RaisesException] getter DOMString (unsigned long index);
+ [RaisesException] setter DOMString (unsigned long index, DOMString value);
+ [RaisesException] deleter boolean (unsigned long index);
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/storage/StorageEvent.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698