简体   繁体   English

Requirejs和骨干应用程序,在IE8中不起作用

[英]Requirejs and backbone app, not working in IE8

I am learning backbone.js and use require.js to make a modular app. 我正在学习bone.js,并使用require.js制作模块化应用程序。

I've got it working on every browser except IE8 where I get some major errors and a blank, white page. 我可以在除IE8之外的所有浏览器上正常工作,在IE8上我遇到一些重大错误和空白页。

Here is the link to the app , open it in IE8 and see the error. 这是该应用程序链接 ,请在IE8中打开它并查看错误。

I have no idea what to do, I have searched and searched and I need help in making it work. 我不知道该怎么办,我已经搜索了很多,并且需要帮助以使其工作。

Any ideas? 有任何想法吗?

Here are the errors: 错误如下:

SCRIPT445: Object doesn't support this action 
jquery.min.js, line 4 character 29137
SCRIPT5007: Object expected 
backbone-min.js, line 1 character 17010

And here is my main.js file: 这是我的main.js文件:

// file: main.js

    require.config({

        paths: {
            "jquery" : "http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min",
            "underscore" : "http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min",
            "backbone" : "http://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.1.0/backbone-min",
            "text" : "http://cdnjs.cloudflare.com/ajax/libs/require-text/2.0.10/text"
        },

        shim: {
            underscore: {
                exports: '_'
            },

            backbone: {
                deps: ["underscore", "jquery"],
                exports: "Backbone"
            },

            text : {
                exports : 'text'
            }
        }

    });

    require(['app'], function (App) {

        App.initialize();
    });

You're using jQuery 2.x, which does not support IE8. 您正在使用不支持IE8的jQuery2.x。 Try using jQuery 1.10 instead. 尝试改用jQuery 1.10。 Details on jquery..com 关于jquery.com的详细信息

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM