optimal-select icon indicating copy to clipboard operation
optimal-select copied to clipboard

Different results for same node with `getSingleSelector` and `getMultipleSelector`

Open xMartin opened this issue 9 years ago • 1 comments

<div id="div1">
  <span id="span1"></span>
</div>
OptimalSelect.getSingleSelector(span1)  // "#span1
OptimalSelect.getMultiSelector([span1])  // "#div1 span[id]"

Is this expected?

xMartin avatar Jan 23 '17 08:01 xMartin

#span1 sounds very specific, while #div1 span[id] does not sound so unique to me. I think it's expected. Single Selector should find unique selector, Multi Selector should find common selector.

entrptaher avatar May 24 '19 01:05 entrptaher