Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 class $CLASSNAME$EXTENDS$IMPLEMENTS$NATIVESPEC { | |
| 6 $!MEMBERS | |
| 7 | |
| 8 // Storage needs a special implementation of dartObjectLocalStorage since it | |
| 9 // captures what would normally be an expando and places property in the | |
| 10 // storage, stringifying the assigned value. | |
| 11 | |
| 12 var get dartObjectLocalStorage() native """ | |
|
Jacob
2012/02/07 18:58:03
not needed for html
Jennifer Messerly
2012/02/07 21:05:14
Done. Also removed these form the DOMType interfac
| |
| 13 if (this === window.localStorage) | |
| 14 return window._dartLocalStorageLocalStorage; | |
| 15 else if (this === window.sessionStorage) | |
| 16 return window._dartSessionStorageLocalStorage; | |
| 17 else | |
| 18 throw new UnsupportedOperationException('Cannot dartObjectLocalStorage for unknown Storage object.'); | |
| 19 """ { throw new UnsupportedOperationException(''); } | |
| 20 | |
| 21 void set dartObjectLocalStorage(var value) native """ | |
| 22 if (this === window.localStorage) | |
| 23 window._dartLocalStorageLocalStorage = value; | |
| 24 else if (this === window.sessionStorage) | |
| 25 window._dartSessionStorageLocalStorage = value; | |
| 26 else | |
| 27 throw new UnsupportedOperationException('Cannot dartObjectLocalStorage for unknown Storage object.'); | |
| 28 """ { throw new UnsupportedOperationException(''); } | |
| 29 } | |
| OLD | NEW |