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

Side by Side Diff: client/dom/generated/src/frog/Storage.dart

Issue 9138007: Frog DOM changes to support OLS on Storage objects (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 11 months 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 class Storage native "*Storage" { 2 class Storage native "*Storage" {
3 3
4 int length; 4 int length;
5 5
6 void clear() native; 6 void clear() native;
7 7
8 String getItem(String key) native; 8 String getItem(String key) native;
9 9
10 String key(int index) native; 10 String key(int index) native;
11 11
12 void removeItem(String key) native; 12 void removeItem(String key) native;
13 13
14 void setItem(String key, String data) native; 14 void setItem(String key, String data) native;
15 15
16 var dartObjectLocalStorage; 16 var get dartObjectLocalStorage() native """
17 if (this === window.localStorage)
18 return window._dartLocalStorageLocalStorage;
19 else if (this === window.sessionStorage)
20 return window._dartSessionStorageLocalStorage;
21 else
22 throw new UnsupportedOperationException('Cannot dartObjectLocalStorage for unknown Storage object.');
23 """;
24
25 void set dartObjectLocalStorage(var value) native """
26 if (this === window.localStorage)
27 window._dartLocalStorageLocalStorage = value;
28 else if (this === window.sessionStorage)
29 window._dartSessionStorageLocalStorage = value;
30 else
31 throw new UnsupportedOperationException('Cannot dartObjectLocalStorage for unknown Storage object.');
32 """;
17 33
18 String get typeName() native; 34 String get typeName() native;
19 } 35 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698