OLD | NEW |
---|---|
1 #library('dom'); | 1 #library('dom'); |
2 | 2 |
3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 // for details. All rights reserved. Use of this source code is governed by a | 4 // for details. All rights reserved. Use of this source code is governed by a |
5 // BSD-style license that can be found in the LICENSE file. | 5 // BSD-style license that can be found in the LICENSE file. |
6 | 6 |
7 // DO NOT EDIT | 7 // DO NOT EDIT |
8 // Auto-generated Dart DOM library. | 8 // Auto-generated Dart DOM library. |
9 | 9 |
10 | 10 |
(...skipping 9103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9114 void clear() native; | 9114 void clear() native; |
9115 | 9115 |
9116 String getItem(String key) native; | 9116 String getItem(String key) native; |
9117 | 9117 |
9118 String key(int index) native; | 9118 String key(int index) native; |
9119 | 9119 |
9120 void removeItem(String key) native; | 9120 void removeItem(String key) native; |
9121 | 9121 |
9122 void setItem(String key, String data) native; | 9122 void setItem(String key, String data) native; |
9123 | 9123 |
9124 var dartObjectLocalStorage; | 9124 var get dartObjectLocalStorage() native """ |
9125 if (this === window.localStorage) | |
9126 return window._dartLocalStorageLocalStorage; | |
9127 else if (this === window.sessionStorage) | |
9128 return window._dartSessionStorageLocalStorage; | |
9129 else | |
9130 throw new UnsupportedOperationException('Cannot dartObjectLocalStorage for unknown Storage object.'); | |
9131 """; | |
sra1
2012/01/09 22:20:06
The native method needs a Dart body that reference
vsm
2012/01/10 00:42:00
Done.
| |
9132 | |
9133 void set dartObjectLocalStorage(var value) native """ | |
9134 if (this === window.localStorage) | |
9135 window._dartLocalStorageLocalStorage = value; | |
9136 else if (this === window.sessionStorage) | |
9137 window._dartSessionStorageLocalStorage = value; | |
9138 else | |
9139 throw new UnsupportedOperationException('Cannot dartObjectLocalStorage for unknown Storage object.'); | |
9140 """; | |
9125 | 9141 |
9126 String get typeName() native; | 9142 String get typeName() native; |
9127 } | 9143 } |
9128 | 9144 |
9129 class StorageEvent extends Event native "*StorageEvent" { | 9145 class StorageEvent extends Event native "*StorageEvent" { |
9130 | 9146 |
9131 String key; | 9147 String key; |
9132 | 9148 |
9133 String newValue; | 9149 String newValue; |
9134 | 9150 |
(...skipping 2998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
12133 startIndex = a.length - 1; | 12149 startIndex = a.length - 1; |
12134 } | 12150 } |
12135 for (int i = startIndex; i >= 0; i--) { | 12151 for (int i = startIndex; i >= 0; i--) { |
12136 if (a[i] == element) { | 12152 if (a[i] == element) { |
12137 return i; | 12153 return i; |
12138 } | 12154 } |
12139 } | 12155 } |
12140 return -1; | 12156 return -1; |
12141 } | 12157 } |
12142 } | 12158 } |
OLD | NEW |