Coder Social home page Coder Social logo

Comments (6)

jfly avatar jfly commented on August 29, 2024

This is because Safari doesn't have a bind() function. This is reproducible in my version of Firefox as well. I've fixed this in my fork of twisty.js, I'll send a pull request soon.

from twisty.js.

lgarron avatar lgarron commented on August 29, 2024

Yeah, that's annoying. I've fixed it as well, with an anonymous function, so I'll use that for now.

from twisty.js.

jfly avatar jfly commented on August 29, 2024

Yeah, that's a solution. Personally, I think it would be nice to have access to bind throughout the source code. My "fix" was to copy the definition of Function.prototype.bind from here: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind. Your call.

from twisty.js.

lgarron avatar lgarron commented on August 29, 2024

I think I would prefer not to port language implementations. If Safari gets bind, though, I agree it would be nicer to switch over.

from twisty.js.

jfly avatar jfly commented on August 29, 2024

This isn't a huge deal to me, but how is what I'm proposing any different than the duck punching in RequestAnimationFrame.js?

from twisty.js.

lgarron avatar lgarron commented on August 29, 2024

It isn't; just more verbose. I think it's fine now (Although maybe it should eventually be separated from the twisty.js source into a utility file - but that's once we have build scripts and stuff).

from twisty.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.