I have a problem and I can`t solve it. I have 2 polymer element nested.
In principal HTML page: index.html
<poly-container a="Hi">
<poly-item b="hi"></poly-item>
</poly-container>
In Polymer HTML definition: polycontainer.html
<poly-container>
<template> ...
<content></content>
</poly-container>
In Dart class: polycontainer.dart
...Have tag <content>
for render external DOM;
...and the 2 classes: PolyContainer
and PolyItem
...
ContentElement CE=shadowRoot.querySelectAll('content');
List<Node> LN= CE.getDistributedNodes();
// LN[i] is a Node type, but we know is an element with type PolyItem.
for (var i=0; i < ......) {
PolyItem PI= ( cast ) LN[i]; // Error in time running only;
......
}
...I tried several ways.
I can't access to element PolyItem
. Only access to Node. I can't cast.
How do it ???