The solution used is great for simple selectors, but doesn't hold up when using attribute selectors with values that contain braces.
For instance the following works:
console.log(splitSelectors('img[alt^="[text]"],div.test'))
But this does not:
console.log(splitSelectors('img[alt^="[text"],div.test'))
(notice the missing closing square brace inside the double quotes)
Although this may seem pedantic, this could occur within more dynamic applications that rely on user input or dynamic values.
The solution used is great for simple selectors, but doesn't hold up when using attribute selectors with values that contain braces.
For instance the following works:
But this does not:
(notice the missing closing square brace inside the double quotes)
Although this may seem pedantic, this could occur within more dynamic applications that rely on user input or dynamic values.