querySelector with `:last-of-type` returns null

On this site,

  • The command document.querySelector(".cobalt-Button--standalone") returns a node.
  • But the command document.querySelector(".cobalt-Button--standalone:last-of-type") returns null.


Read more here: https://stackoverflow.com/questions/66330816/queryselector-with-last-of-type-returns-null

Content Attribution

This content was originally published by Baptiste Arnaud at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: