使用由聚合物或任何其他库创建的自定义元素

Using custom elements created by polymer or any other library

在我使用 polymer 库创建自定义元素后,我是否必须在我的网站中添加除 polyfill 之外的任何其他库才能使其在现代浏览器中运行。

是的。

您需要添加 webcomponents polyfill 库才能使您的自定义元素正常工作。

在您的主要 (index.html) 文件中:

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