Getting a node list by querySelectorAll()
问题 Given the following sample code: import { LitElement, html, css } from 'lit-element'; class ItemsDisplay extends LitElement { static get styles() {...} static get properties {...} constructor () { super(); ... } render { return html` ${this.items.map((item, index, array) => html` <div class="name"> ... </div> `)} `; } } What is the appropriate way to select all nodes with class "name"? I have tried the following ways, but failed ; all times nodesList was undefined : Inside constructor : this