【发布时间】:2014-09-09 16:02:36
【问题描述】:
我编写了在 Chrome 中完美运行的自定义聚合物元素。但它甚至没有出现在 Firefox 中。我使用 vulcanize 将所有内容连接到一个文件中,甚至是平台和聚合物。这是我调用 vulcanize 的主索引文件。
<!DOCTYPE html>
<html>
<head>
<script src="bower_components/platform/platform.js"></script>
<link rel="import" href="bower_components/my_polymer/index.html">
</head>
</html>
这是我的聚合物元素索引文件。
<!DOCTYPE html>
<html>
<head>
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="my-polymer-element.html">
</head>
</html>
【问题讨论】:
-
我在 Firefox 中也遇到了 Polymer 的问题。你检查错误控制台了吗?
-
Chrome 中没有警告或错误,但在 Firefox 中我收到了此警告。改变对象的 [[Prototype]] 会导致您的代码运行非常缓慢;而是使用 Object.create 创建具有正确初始 [[Prototype]] 值的对象
-
我不确定这个错误是不是因为 Firefox 不支持,因为我什至在 Firefox 版本 31 中看不到这个页面 polymer-project.org/components/core-elements/demo.html,但至少它在控制台中显示错误。
标签: javascript firefox polymer web-component