[英]Polymer element not showing in firefox
我已經編寫了可在Chrome中完美運行的自定義聚合物元素。 但它甚至沒有出現在Firefox中。 我使用了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>
您的設置錯誤。
您不應該導入index.html,而是在主頁中導入元素定義。 您的主頁應如下所示:
<html>
<head>
<script src="bower_components/platform/platform.js"></script>
<link rel="import" href="my-polymer-element.html">
</head>
...
</html>
請注意,my.polymer my-polymer-element.html
定義文件頂部將polymer.html列為依賴項導入。
有關示例,請參見http://www.polymer-project.org/docs/start/creatingelements.html#createpolyel以及種子元素: http : //www.polymer-project.org/docs/start/reusableelements.html 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.