You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So let's say I have generated a lovely selector like
.opened .single-link > span
My problem is that while the opened class is unique on the page at the moment, with my next click, I will open another 'section' of the page, and then there will be two opened classes present, and my original selector is no longer unique.
I guess I could use a MutationObserver to watch for class changes and build up a list of 'volatile' classnames, however this will not work if the HTML has exactly one .opened class at the start.
So I was thinking that it would be nice to have the ability to generate a 'backup' selector, which would be the equivalent of the following
finder(target,{
className: (e) => e !== 'opened' && e !== 'single-link',
})
Is that something that is worthwhile to elevate to a single config option, which takes into account what would normally be generated, but then operates on alternative basis that whatever is currently unique, may not be in future?
The text was updated successfully, but these errors were encountered:
So let's say I have generated a lovely selector like
My problem is that while the
opened
class is unique on the page at the moment, with my next click, I will open another 'section' of the page, and then there will be twoopened
classes present, and my original selector is no longer unique.I guess I could use a MutationObserver to watch for class changes and build up a list of 'volatile' classnames, however this will not work if the HTML has exactly one
.opened
class at the start.So I was thinking that it would be nice to have the ability to generate a 'backup' selector, which would be the equivalent of the following
Is that something that is worthwhile to elevate to a single config option, which takes into account what would normally be generated, but then operates on alternative basis that whatever is currently unique, may not be in future?
The text was updated successfully, but these errors were encountered: