以下代码适用于Dartium,但在最近的Firefox和Edge中引发了异常:
version: '2'
services:
hadoop:
image: hadoop:2.6
flume:
image: flume:last
links:
- hadoop
其中initPolymer().then((Zone z) {
(document.getElementById("fooDialog") as PolymerElement)
.set("opened", true);
});
是文档正文中的自定义聚合物元素。来自例外的消息:
fooDialog
当我将其重写为:
时,问题就消失了Casting value of type HtmlElement to incompatible type PolymerElement
所以我猜我早点打电话给initPolymer().then((Zone z) {
new Future.delayed(new Duration(seconds: 5), () {
(document.getElementById("fooDialog") as PolymerElement)
.set("opened", true);
});
});
。我怎么知道聚合物在最近的dc聚合物rc中完全初始化(dart sdk 1.15.0,聚合物1.0.0-rc.16)?
答案 0 :(得分:1)