I am receiving this error message when including backbone in my application,
Uncaught TypeError: Object [object DOMWindow] has no method 'set'
but I have jquery (1.4.4) and underscore.js (开发者_开发问答1.1.7) loaded before backbone, why is this method still missing?
Or you are instantiating a model without new
prefix which would cause it to be bound to global window instead of this
. SO reference.
Based solely on the error message, I would search your code for this.set
. It appears that you're referencing this
with the expectation that it's a model, but the function isn't bound correctly.
精彩评论