Polymer.dom(this.root).querySelector uses the shadow DOM API.
A polymer with a shadow DOM (default is 1.0) is not a fully polyfill shadow DOM.
To ensure that all Polymer features that are not supported by the browser are taken into account correctly (e.g., <content> projection) when using querySelector() ), you need to use the Polymer.dom(...) wrapper Polymer.dom(...) .
this.$ is the receiver that returns a static map from the element identifier to the element reference. Elements created by dom-repeat or hidden by dom-if or otherwise created dynamically are not included.
this.$$() is an abbreviated function for Polymer.dom(this.root).querySelector() and therefore takes into account dynamically created elements, since it actually queries the DOM at runtime.
source share