Polymer 在 IE 或 edge 中不起作用,但在 chrome 中可以,但是对于 Doctype,它在 chrome 中也不起作用

Polymer doesn't work in IE or edge but in chrome it does, however with a Doctype it doesn't work in chrome either

我的 polymer 项目遇到了一些问题,我的代码在 IE、Edge 中不起作用,如果我包含 <!doctype html>,甚至在 chrome 中也不起作用。这是我的代码:

<!doctype html>
<html>
  <head>
    <link rel="import" href="bower_components/paper-header-panel/paper-header-panel.html">
    <link rel="import" href="bower_components/paper-card/paper-card.html">
    <LINK REL=StyleSheet HREF="style.css" TYPE="text/css">
    <link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
    <link rel="import" href="bower_components/polymer/polymer.html">
  </head>
  <body>
    <paper-header-panel mode="standard" id>
      <paper-toolbar  style="background-color: some-color">
        <h1>Blah</h1>
      </paper-toolbar>
      <div id="content">
      <div class="center2">
        <h3>Blah Blah Blah<span id="orange">Blah Blah Blah</span></h3>
      </div>
      <paper-card heading="Blah Blah Blah" id="main">
        <div class="card-content">
        </div>
      </paper-card>
      <paper-card heading="Blah Blah Blah" id="main">
        <div class="card-content">
          <img src="img.png" height="200px" id="img"/>
          </br>
          Blah Blah Blah
        </div>
      </paper-card>
      </div>
    </paper-header-panel>
  </body>
</html>

我们将重视任何帮助。谢谢!

您需要 polyfill 才能在非 chrome 浏览器中工作。我认为您在 chrome 中没有这样做,但也许在下一个版本之前您仍然这样做。

<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>

在开始导入任何其他内容之前在页眉中