I am trying to register a callback method at the start of my program and then call it at different times throughout the life of my web application. The callback works fine, until I refresh the browser, after which the class variable that I use is reset. What is the right way to go about doing this? Right now I do the following -
class MyManager
@registerCallback : (callback) ->
@callback = callback
And its called like -
MyManager.registerCallback myMethod
Any help would be appreciated!