Cannot call 'start' of undefined when starting backbone.js history.

后端 未结 8 1150
感情败类
感情败类 2020-12-15 16:30

I get Cannot call \'start\' of undefined when calling...

    Backbone.history.start()

When running some checks Backbone return

8条回答
  •  旧巷少年郎
    2020-12-15 17:20

    (function($) {
    
        var Demo = Backbone.Router.extend({
            routes:{
                '*actions':'defaultRoute'
            },
            defaultRoute:function(action){
                alert('xss');
            }
        });
    
        var demo = new Demo;
        Backbone.history.start();
        //My site http://bbs.w3hacker.com
    
    })(jQuery);
    

提交回复
热议问题