How to find an HTML element in a Polymer model

advertisements

I'm using Dart and Polymer 1.0.0-rc.9. I have my own element (simplified here of course):

<dom-module id="something">
 <style>
 </style>

 <template>
   <paper-slider id='myslider'></paper-slider>
   <div id='mydiv'></div>
 </template>
</dom-module>

On the Dart side, if I do:

 var div=queryselector('#mydiv')

it returns null.

I then set:

 <template is='dom-bind'>

it finds it. But that creates errors, which say I must use a simple template.

So how do I find my <div> element?


Use

var listdivs = Polymer.dom (this.root).querySelectorAll('div');