我已经使用多个自定义组件在Chrome中成功构建了一个网站,一切都按预期工作.
如果我在演示页面上一次运行一个组件,它将在Firefox上呈现.现在,在使用多个自定义组件进行跨浏览器测试时,使用Firefox v41时它们都无法呈现*.(虽然一次快速刷新得到一些组件出现;侥幸?)
*我的意思是渲染失败是页面上dom show中的内容,但似乎没有投影到阴影dom中,也没有继承自定义组件中定义的样式或函数,只是继承了样式来自索引文件.
如何在Firefox的一个页面上显示多个dom-modules?
错误日志:
Error: DuplicateDefinitionError: a type with name 'dom-module' is already registered
TypeError: Polymer.Base._getExtendedPrototype is not a function
TypeError: Polymer.CaseMap is undefined
TypeError: this._desugarBehaviors is not a function
TypeError: this._meta.byKey is not a function
TypeError: Polymer.Base._hostStack is undefined
Run Code Online (Sandbox Code Playgroud)
索引文件:
<html>
<head>
<link href='/css/styles.css' rel='stylesheet' type='text/css'>
<script src="/bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="/bower_components/polymer/polymer.html">
<link rel="import" href="/bower_components/ac-theme/color.html">
<link rel="import" href="/bower_components/ac-theme/sizing.html">
<link rel="import" href="/bower_components/ac-messagebar/ac-messagebar.html">
<link rel="import" href="/bower_components/ac-site-footer/ac-site-footer.html">
</head>
<body>
<ac-messagebar>Message bar.</ac-messagebar>
<ac-site-footer small-query="(max-width: 500px)">
<section>
<ul>
<li>
Links<br/>
<ul>
<li><a …Run Code Online (Sandbox Code Playgroud)