Coder Social home page Coder Social logo

Comments (8)

jashkenas avatar jashkenas commented on May 20, 2024

What's the deal with unbinding callbacks in Zepto? Can you never remove a callback?

from backbone.

thejefflarson avatar thejefflarson commented on May 20, 2024

I've been using a combination overriding delegateEvents on a child class and and a similar patch to zepto that calls removeEventListener with the callbacks in the events object. It's a pain because there's no remove all events call like in jQuery. Anyhow I just opened a ticket over there:

https://github.com/madrobby/zepto/issues/issue/32

from backbone.

jashkenas avatar jashkenas commented on May 20, 2024

Correct me if I'm wrong, but looking at the Zepto source:

https://github.com/madrobby/zepto/blob/master/src/zepto.js

It seems like there are 3 places where addEventListener is mentioned, and no places where removeEventListener is mentioned. Kinda seems like Zepto is still half-baked at this point, if there's no way to unbind the events you've added...

from backbone.

thejefflarson avatar thejefflarson commented on May 20, 2024

Exactly, I think it's an oversight on zeptos part and not something backbone should worry about.

from backbone.

jashkenas avatar jashkenas commented on May 20, 2024

Let's freeze this one until Zepto gets a little more baked than it is currently -- Jeff's ticket still hasn't been addressed.

from backbone.

danielfarrell avatar danielfarrell commented on May 20, 2024

Is there anything else needed/desired from zepto? This would be useful to me and I'll invest the time to write the needed functionality for zepto.

from backbone.

sstephenson avatar sstephenson commented on May 20, 2024

I've got all the Backbone tests passing with a modified fork of Zepto:

https://github.com/sstephenson/backbone/compare/zepto
https://github.com/sstephenson/zepto/compare/master

from backbone.

jashkenas avatar jashkenas commented on May 20, 2024

Alright, Zepto 0.2 is out, as is Backbone 0.3.3, with Zepto support. Thanks for taking care of all the hard work, Sam. Closing the ticket.

from backbone.

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.