gpt4 book ai didi

javascript - platform.js 和 IE11 中对象不支持属性或方法 'getAttribute' 错误

转载 作者:行者123 更新时间:2023-11-28 07:59:03 25 4
gpt4 key购买 nike

从 IE 11 和 Polymer/平台收到以下错误

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 中运行良好。所以我想这一定是一个可比性问题。有什么想法吗?

最佳答案

如果您使用的是 XHTML,那么自关闭标签可能是一个问题:

Serving the page as XHTML will permit self-closing tags, BUT breaks some scripts.

For example, I created this element:

<link rel="import" href="../bower_components/polymer/polymer.html"/>
<polymer-element name="copyright-statement" attributes="copyrightStart">
<template>
<span>
&#169; {{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>

引用文献

关于javascript - platform.js 和 IE11 中对象不支持属性或方法 'getAttribute' 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25653136/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com