My JS CODE:
cell.setAttribute('class','input-cell selected-cell'); //this line is a part of my code.
var input_cell=document.querySelectorAll('.input-cell .selected-cell');
console.log(input_cell)
I am building an excel clone and while rendering cells, I gave them Class attribute.Still while running the querySelectorAll function ,I am getting an empty NodeList.
I thin you are missing a comma.
const cell = document.getElementById("cell");
cell.setAttribute('class','input-cell selected-cell'); //this line is a part of my code.
const input_cell = document.querySelectorAll('.input-cell, .selected-cell');
console.log('input-cell', input_cell)
<div id="cell"></div>