Reputation: 2281
In Polymer 1.x where this.$$('some selector')
was working, what is the equivalent in Polymer 2.0 since this.$$()
doesnt work anymore?
Thanks.
Upvotes: 1
Views: 168
Reputation: 2964
$$
is deprecated in Polymer 2.x
instead you'll have to use something like
this.shadowRoot.querySelector
If you really want to use $$
you can use it from LegacyMixin which has all the deprecated methods. As LegacyMixin
internally extends Polymer.Element
you only need to extend LegacyMixin.
class MyElement extends Polymer.LegacyElement
Upvotes: 1