-
-
Save david-martin/1363666 to your computer and use it in GitHub Desktop.
Local Storage Call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Save | |
$fh.data({ | |
"act": "save", | |
"key": "foo", | |
"val": "bar" | |
}, function () { | |
// save success | |
}, function (code) { | |
// save failed | |
} ); | |
// Load | |
$fh.data( { | |
"key": "foo" | |
}, function (res) { | |
console.log(res.key + '=' + res.val); | |
// expected output => foo=bar | |
}, function (code) { | |
// load failed | |
}); | |
// Remove | |
$fh.data( { | |
"act": "remove", | |
"key": "foo" | |
}, function () { | |
// remove success | |
}, function (code) { | |
// remove failed | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment