Coder Social home page Coder Social logo

backbone.attributes's People

Contributors

akre54 avatar jamesplease avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

backbone.attributes's Issues

Delayed creation of attributes

I came across some unexpected behavior. You might already know that it behaves this way, but I took your example to create window.playlist.

And then:

playlist.attributes;
// => undefined
playlist.getAttribute('currentTrack');
// => 0
playlist.attributes;
// returns the defaults

The expected behavior is that attributes would always exist. I only took a quick glance at the code, but it seems like attributes is only created once one of the wrapped methods is called, so that would explain the behavior.

If this isn't something you're interested in trying to resolve, it might at least be something worth mentioning in the docs.

Requirejs configuration (shim?)

It’d be helpful if you would include docs on how to shim or otherwise add Attributes to Backbone with RequireJS, as I’m requiring Backbone where I need it, and don’t depend on it being available on the window. I’m a bit rusty on the configuration, which makes the bar a bit too high to quickly try out what seems like a promising utility. :)

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.