从IE 11和聚合物/平台获得以下错误
SCRIPT438: Object doesn't support property or method 'getAttribute'
File: platform.js, Line: 12, Column: 30816我已经做了如下的准备。
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1" />这个网站在Chrome上运行得很好。所以我想这一定是一个可比性的问题。知道吗?
发布于 2014-10-27 23:48:22
如果您使用的是XHTML,那么自动关闭标记可能是一个问题:
以XHTML的形式提供页面将允许自动关闭标记,但会破坏一些脚本。 例如,我创建了以下元素:
<link rel="import" href="../bower_components/polymer/polymer.html"/>
<polymer-element name="copyright-statement" attributes="copyrightStart">
<template>
<span>
© {{copyrightStart}}{{thisYear}}
</span>
</template>
<script>
Polymer('copyright-statement',{
copyrightStart:2014,
created: function() {
console.log("The copyright-statement has been registered.");
},
ready: function() {
this.thisYear = new Date().getFullYear();
if(this.copyrightStart != null) {
if(parseInt(this.copyrightStart) < this.thisYear) {
this.copyrightStart = this.copyrightStart + " \u2014 ";
} else {
this.copyrightStart = "";
}
}
}
});
</script>
</polymer-element>参考资料
https://stackoverflow.com/questions/25653136
复制相似问题