In JavaScript, given I have selected an HTML element, for example:
<div id="some-id" class="class-1 class-2">...</div>
Is there an easy way to create the corresponding CSS selector/QuerySelector?
"div#some-id.class-1.class-2"
Or is the only way to construct this string manually using tagName, id and classList?