Created
June 4, 2014 06:09
-
-
Save moznion/fe92afccf032c6bcd72b to your computer and use it in GitHub Desktop.
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
chrome.storage.local.set({ | |
"foo": Infinity | |
}, function () { | |
chrome.storage.local.get('foo', function (result) { | |
console.log(result['foo']); // <= undefined (Infinityにならない) | |
}); | |
}); | |
chrome.storage.local.set({ | |
"foo": 42 | |
}, function () { | |
chrome.storage.local.get('foo', function (result) { | |
console.log(result['foo']); // <= 42 | |
}); | |
}); | |
chrome.storage.local.set({ | |
"foo": Infinity | |
}, function () { | |
chrome.storage.local.get('foo', function (result) { | |
console.log(result['foo']); // <= 42 (Infinityにならず,直前に格納された値がそのまま) | |
}); | |
}); | |
chrome.storage.local.set({ | |
"foo": undefined | |
}, function () { | |
chrome.storage.local.get('foo', function (result) { | |
console.log(result['foo']); // <= 42 (undefinedにならず,直前に格納された値がそのまま) | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment