93
edits
(→Other Notes: rephrasing) |
(added notes on async stuff) |
||
Line 72: | Line 72: | ||
==== Other Notes ==== | ==== Other Notes ==== | ||
''Equivalence vs. Equality'' | |||
The values passed into <code>set()</code> and returned from <code>get()</code> are all serialized/de-serialized at the time of calling; this means that, for instance, given the following code: | The values passed into <code>set()</code> and returned from <code>get()</code> are all serialized/de-serialized at the time of calling; this means that, for instance, given the following code: | ||
Line 85: | Line 87: | ||
assert(jetpack.storage.simple.get('test') != original); | assert(jetpack.storage.simple.get('test') != original); | ||
</pre> | </pre> | ||
''Asynchronicity'' | |||
In the future, it may be useful to add an optional callback parameter to every function in this API, so that Jetpacks can take advantage of storage backends which support asynchronicity (such as [https://developer.mozilla.org/en/Storage#Asynchronously Asynchronous mozStorage]). |
edits