Polymer 聚合物示例代码在firefox中不起作用

Polymer 聚合物示例代码在firefox中不起作用,polymer,Polymer,我正在试用谷歌提供的示例代码 这就是我到目前为止所做的: index.html: <!DOCTYPE html> <html lang="en">

我正在试用谷歌提供的示例代码

这就是我到目前为止所做的:

index.html:

<!DOCTYPE html>                                                                                                          
<html lang="en">                                                                                                         
  <head>                                                                                                                 
    <meta charset="utf8">                                                                                                
    <meta http-equiv="X-UA-Compatible" content="IE=edge">                                                                
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">              
    <script src="https://polygit.org/components/webcomponentsjs/webcomponents-lite.js"></script>                         
    <link href="/my_components/icon-toggle-demo.html" rel="import">                                                      
  </head>                                                                                                                
  <body>                                                                                                                 
    <icon-toggle-demo toggle-icon="star"></icon-toggle-demo>                                                             
  </body>                                                                                                                
</html>  

我已经包括了polyfill。还有什么遗漏吗?

你没有做错什么。
index.html
文件中的以下行默认为webcomponents polyfill的最新版本(v1.0.0-rc.1)

<script src="https://polygit.org/components/webcomponentsjs/webcomponents-lite.js"></script>

Firefox的当前版本中似乎有一个bug。在聚合物文档中链接的Plunker中也可以观察到相同的错误。这将有望由聚合物团队解决

要暂时修复它,您可以显式地使用旧版本。比如说

<script src="https://cdn.rawgit.com/webcomponents/webcomponentsjs/v0.7.24/webcomponents-lite.js"></script>

WebComponents v1.0.0+只能与Polymer 2.0一起使用。在Polymer 1上使用^0.7.24版。

我在Github上打开了一个。
TypeError: document.registerElement is not a function
<script src="https://polygit.org/components/webcomponentsjs/webcomponents-lite.js"></script>
<script src="https://cdn.rawgit.com/webcomponents/webcomponentsjs/v0.7.24/webcomponents-lite.js"></script>