GithubHelp home page GithubHelp logo

Comments (7)

myoung8 avatar myoung8 commented on July 21, 2024

+1

 EventsDispatcher.prototype.unbind = function(event_name, callback) {
   var index = this.callbacks[event_name].indexOf(callback)
   this.callbacks[event_name].splice(index, 1)
   return this;// chainable
};

from pusher-js.

ruudk avatar ruudk commented on July 21, 2024

+1 for this

from pusher-js.

lopezdonaque avatar lopezdonaque commented on July 21, 2024

+1!! It's very important to allow unbind when some component is destroyed.

For example, using ExtJS:

cmp.mon( pusher_channel, 'event_name', callback );

from pusher-js.

rmw avatar rmw commented on July 21, 2024

+1!

When is the 1.10.0 release slated for?

from pusher-js.

leggetter avatar leggetter commented on July 21, 2024

1.10 has been release but the unbind addition was missed out. We've a pull request with older browser support (that don't support Array.indexOf) under review now.

from pusher-js.

dmitry avatar dmitry commented on July 21, 2024

🆙

from pusher-js.

leggetter avatar leggetter commented on July 21, 2024

Version 1.11 of the Pusher JavaScript library now implements the unbind function. The hosted version of the library is available here:

You can see the implementation here:
https://github.com/pusher/pusher-js/blob/master/src/pusher_event_dispatcher.js#L30

from pusher-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.