Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

destroy method #2

Closed
philipdouble opened this issue Jul 15, 2013 · 1 comment
Closed

destroy method #2

philipdouble opened this issue Jul 15, 2013 · 1 comment

Comments

@philipdouble
Copy link

That all worked fine and dandy but then I was running into an issue where it was very difficult to remove the event listeners. To resolve this, I added the following to client.js:

/**

  • Destroys the old listeners and allows me to refresh new ones.
    */
    this.destroy = function(){

callbacks = {};
uploadedFiles = [];
readyCallbacks = [];
}

This allows me to do a hard reset of siofu when I load a new page or new content by calling it from the template when it is being unloaded. This also resolved an issue where if I did several edits on a page (moved another image to the upload spot) both would appear (in my case, I only want one).

vote539 pushed a commit that referenced this issue Jul 17, 2013
@vote539
Copy link
Collaborator

vote539 commented Jul 17, 2013

A destroy method has been added to the module. Information is in the readme. Version 0.2.5.

@vote539 vote539 closed this as completed Jul 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants