I have my element :
<dom-module id="x-el">
<p class="special-paragraph">first paragraph</p>
<content></content>
</dom-module>
and I use it like
<x-el>
<p class="special-paragraph">second paragraph</p>
</x-el>
in my imperative part:
Polymer({
is: 'x-el',
ready: function () {
/* this will select all .special-paragraph in the light DOM
e.g. 'second paragraph' */
Polymer.dom(this).querySelectorAll('.special-paragraph');
/* this will select all .special-paragraph in the local DOM
e.g. 'first paragraph' */
Polymer.dom(this.root).querySelectorAll('.special-paragraph');
/* how can I select all .special-paragraph in both light DOM and
local DOM ? */
}
});
Is it possible to do that using Polymer built-in's ? Or should I use the default DOM api ?
this.$$.(selector)
returns the first node in the elements local DOM that matches theselector
. – Meleager