简体   繁体   English

marionettejs attachhtml ie8-意外调用方法或属性

[英]marionettejs attachhtml ie8 - unexpected call to method or property

I'm testing my site in IE8. 我正在IE8中测试我的网站。 I'm using MarionetteJS and I have views dynamically added to the page. 我正在使用MarionetteJS,并且已将视图动态添加到页面中。

My page breaks in the marionette.js code on this line: 我的页面在此行上的marionette.js代码中中断:

this.el.appendChild(view.el); 

Can anyone point me in the right direction on how to fix this? 谁能指出正确的解决方法? Sorry if it's a little vague, but I'm not sure where to go from here. 不好意思,如果有点含糊,但是我不确定从这儿去哪里。

在此处输入图片说明

Yeah the problem in this case is the html5 tag, not really Marionette. 是的,在这种情况下,问题是html5标签,而不是真正的木偶。 But if you use https://github.com/afarkas/html5shiv you can use html5 tags with no issue in IE8 with Marionette. 但是,如果您使用https://github.com/afarkas/html5shiv ,则可以在装有Marionette的IE8中使用html5标签,而不会出现问题。

What jQuery version are you using? 您正在使用哪个jQuery版本? You need a legacy build (the 1.* versions) for Internet Explorer 8. 您需要Internet Explorer 8的旧版构建(1. *版本)。

I found the issue. 我发现了问题。 I was using Boilerplate MVC and it was a header tag that was being used, which Marionette with IE8 didn't particularly like. 我使用的是Boilerplate MVC,它是一个正在使用的header标签,带有IE8的Marionette并不特别喜欢。 Once I replaced the header with a div , IE8 worked fine. 将标头替换为div ,IE8即可正常工作。

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

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