Open PMK opened 9 years ago
Right so in this case you'd need to either set Backbone.View = Backbone.NativeView
before loading Chaplin, or _.extend(Backbone.View.prototype, Backbone.NativeViewMixin)
before calling any view methods.
I made a branch of Chaplin a few months ago to support Backbone.NativeView but got sidetracked. I'll push it up and maybe try to work on it if I get support.
I'm having trouble getting this working in a exoskeleton/lodash/chaplin environment with requirejs.
If I call _.extend(Backbone.View.prototype, Backbone.NativeViewMixin)
it seems to go into an infinite loop in chaplin's utils.getPrototypeChain, and I'm not sure of the best place to put
Backbone.View = Backbone.NativeView
Any help would be much appreciated
I've figured it out :)
Both jQuery and Underscore are now fully optional in Exoskeleton, see https://github.com/paulmillr/exoskeleton/issues/102. If you use Exoskeleton instead of Backbone with Chaplin, and you're not using jQuery and Underscore, Chaplin calls
Backbone.View
, but should callBackbone.NativeView
. An error will be triggered, see https://github.com/paulmillr/exoskeleton/commit/b8e5dc9b6f88f5767459d02c20b2bfc49903c1c2.Can you implement the option to use Chaplin with Exoskeleton, but without jQuery and Underscore?