元素结构

定义没有内容的元素。

<dom-module id="empty-element">
  <template>
    <style>
    </style>
  </template>

  <script>
    Polymer({
      is: 'empty-element',
    });
  </script>
</dom-module>

然后你可以在任何其他页面中使用新元素。

<!DOCTYPE html>
<html>
    <head>
        <!-- Using lite version as Polymer does not require Polyfill for Shadow Dom -->
        <script src="path/to/bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
        <!-- Importing the element assuming file name is also empty-element.html -->
        <link rel="import" href="empty-element.html">
    </head>

    <body>
        <empty-element></empty-element>
    </body>
</html>