Created
October 4, 2013 05:58
-
-
Save rizowski/6821566 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
# the variable I am trying to use | |
canvaskey = "" | |
# the callback method to set the variable | |
setkey = (item) => | |
canvaskey = item | |
# Starting the chain | |
getcanvaskey = () => | |
chrome.storage.local.get('key', (item) -> | |
setkey(item.canvaskey) | |
) | |
# this is the same as | |
localStorage.key | |
# or | |
localStorage['key'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment