Skip to content

Commit ac95f42

Browse files
committed
Updating documentation again
1 parent 7afcf79 commit ac95f42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,9 @@ function getUniqueSelector( element, selectorTypes, attributesToIgnore, filter )
188188
}
189189

190190
/**
191-
* Generate unique CSS selector for given DOM element
191+
* Generate unique CSS selector for given DOM element. Selector uniqueness is determined based on the given element's root node.
192+
* Elements rendered within Shadow DOM will derive a selector that is unique within the associated ShadowRoot context.
193+
* Otherwise, a selector that is unique within the element's owning document will be derived.
192194
*
193195
* @param {Element} el
194196
* @param {Object} options (optional) Customize various behaviors of selector generation
@@ -200,7 +202,6 @@ function getUniqueSelector( element, selectorTypes, attributesToIgnore, filter )
200202
* @return {String}
201203
* @api private
202204
*/
203-
204205
export default function unique( el, options={} ) {
205206
const {
206207
selectorTypes=['id', 'name', 'class', 'tag', 'nth-child'],

0 commit comments

Comments
 (0)