简体   繁体   English

IE在Zurb foundation.min.js中抛出“对象不支持属性或方法'defineProperty'”的对象。 是否有修复程序或解决方法?

[英]IE is throwing a `Object doesn't support property or method 'defineProperty'` in Zurb foundation.min.js. Is there a fix or work around?

I have a Drupal site with Zurb Foundation 6.2. 我有一个Zurb Foundation 6.2的Drupal网站。 When I try to run the site in IE 11 all the layout is broken and I get an error: 当我尝试在IE 11中运行该站点时,所有布局都损坏了,并且出现错误:

Object doesn't support property or method 'defineProperty' 对象不支持属性或方法“ defineProperty”

in foundation.min.js. 在foundation.min.js中。

This method appears several times in foundation.js, eg: 此方法在foundation.js中出现多次,例如:

var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

and I don't feel confident in altering it or screwing around with Foundation. 我对更改它或与Foundation纠缠不满。

I read somewhere that this could also be caused if an HTML element has an ID of the same name so I brought up the page source of the page and searched, but found nothing. 我在某处读到,如果HTML元素具有相同名称的ID,也可能导致这种情况,因此我调出了页面的页面源并进行了搜索,但未找到任何内容。

Would anyone know if there's is a fix or workaround for this? 谁会知道是否有针对此的修复程序或解决方法?

As @Jaromanda and @Teemu suggested, this was because IE was always starting in 5 mode. 正如@Jaromanda和@Teemu所建议的,这是因为IE始终以5模式启动。 This was because of my companies set up with its intranet. 这是因为我的公司建立了其内部网。

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

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