Closed ale-cci closed 1 year ago
@ale-cci thank you for your help and testing. I understand and confirm your findings, at the moment "nwsapi" does not support nesting the ":is()" pseudo-class. So I will soon have a look and see if I can implement that as for the current spec.
However, in the mean time, you could avoid using these nesting capabilities buy using the "OR" (comma grouping) feature which historically has wider support in "nwsapi", it is optimized and shorter in syntax (20 bytes) and maybe faster too (haven't benchmarked it):
const childs = dom.window.document.body.querySelectorAll(':is(button, input)[type=submit]:not([disabled])')
or use the following one if "button:not([type])" has meaning iin your dom tree:
const childs = dom.window.document.body.querySelectorAll(':is(button, input)[type=submit], button:not([type]):not([disabled])')
Thank you again for the efforts and your time
@ale-cci I am closing this because the issue was seemingly resolved.
Hi, I'm using jsdom@20.0.0 which has nwsapi@2.2.2 as dependency. Additionally the polyfill element-internals-polyfill is installed, which uses the following query selector:
This works on chrome (version n 107.0.5304.110), however when the query is parsed by nwsapi , the following exception is raised (stacktrace added for context):
Here a way to reproduce the issue (using jsdom):
Any help would be appreciated
Thanks Alessandro