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
This is due to a bug in the latest version of nwsapi, which had its first release in three years nine days ago. But it affects JSDOM because this package does not pin a version of nwsapi. You might want to pin 2.2.0 until the linked bug gets fixed.
Minimal reproduction case
let{JSDOM}=require('jsdom');let{ document }=(newJSDOM('<p>')).window;console.log([document.querySelector('P'),document.querySelector('p')]);// prints [ null, HTMLParagraphElement {} ]
How does similar code behave in browsers?
Selectors are not case-sensitive, so both elements of the printed array are non-null.
The text was updated successfully, but these errors were encountered:
I encountered similar error with child selector during XML parsing (XML should be case-sensitive):
// run this in NodeJS, works OK in FF/Chrome (omit these two lines)const{JSDOM}=require('jsdom');constwindow=(newJSDOM()).window;varparser=newwindow.DOMParser();vardoc=parser.parseFromString(`<elem> <Test> content <my-tag>abc</my-tag> </Test></elem>`,'text/xml');console.assert(doc.querySelectorAll('Test').length==1,'Test tag not found');console.assert(doc.querySelectorAll('test').length==0,'test tag exists');console.assert(doc.querySelectorAll('my-tag').length==1,'my-tag tag not found');console.assert(doc.querySelectorAll('Test>my-tag').length==1,'Test>tag not found');
This is due to a bug in the latest version of nwsapi, which had its first release in three years nine days ago. But it affects JSDOM because this package does not pin a version of nwsapi. You might want to pin 2.2.0 until the linked bug gets fixed.
Minimal reproduction case
How does similar code behave in browsers?
Selectors are not case-sensitive, so both elements of the printed array are non-null.
The text was updated successfully, but these errors were encountered: