I’ll do some work after a conditional template is instantiated.
Like this:
<polymer-element name="xyz-test">
<template>
<template if="{{xyz}}">
<div class="main">
<div class="sub1"> </div>
<div class="sub2"> </div>
</div>
</template>
</template>
<script type="application/dart" src="my_test.dart"></script>
</polymer-element>
.
import 'package:polymer/polymer.dart';
import 'dart:html';
@CustomTag('xyz-test"')
class XyzText extends PolymerElement {
// After the Conditional Templates are created,
// I wish to work with the Elements in them.
DocumentFragment instanceTemplate(Element template) {
// Is not working for Conditional Templates
}
@override
Node shadowFromTemplate(Element template) {
// Is not working for Conditional Templates
}
}
Perhaps somebody can give me any Idea.
Thank you very much in advance.