我正在尝试制作嵌套的聚合物元素。编辑器没有显示错误或警告。
组件one.html
<link rel="import" href="componenttwo.html">
<polymer-element name="component-one" noscript>
<template>
<h1>Parent element</h1>
<component-two></component-two>
</template>
</polymer-element>
组件二.html
<polymer-element name="component-two" noscript>
<template>
<h2>Nested element</h2>
</template>
</polymer-element>
测试组件.html
<html>
<head>
<link rel="import" href="componentone.html">
<script src="packages/polymer/boot.js"></script>
<script src="packages/browser/interop.js"></script>
</head>
<body>
<component-one></component-one>
<script type="application/dart" src="testcomponents.dart"></script>
</body>
</html>
当我运行 testcomponents.html 时,浏览器中没有出现任何内容,但在编辑器控制台中出现错误
Invalid CSS property name: -webkit-touch-callout
Exception: Stack Overflow
runMicrotask (package:observe/src/microtask.dart:63:45)
initPolymer (package:polymer/src/loader.dart:32:15)
main (http://127.0.0.1:3030/jukudart2/web/testcomponents.html:5:22)
registerCustomElement (package:custom_element/custom_element.dart:62:25)
initPolymer.<anonymous closure> (package:polymer/src/loader.dart:39:26)
runMicrotask.<anonymous closure> (package:observe/src/microtask.dart:65:16)