Closed CITguy closed 1 year ago
@CITguy I will consider this pseudo-class addition in a future release. In the meantime you can load a duplicate instance of "nwsapi" and extend it to cover your needs by using something like the following:
NW.Dom.registerSelector(
'elementDefined',
/^\:defined/i,
(function(global) {
...
// see details in src/module/nwsapi-jquery.js
...
})(this));
Basic Info:
jsdom
20.0.3jest-environment-jsdom
29.5.0Additional Info
Per MDN and WHATWG, the
:defined
pseudo-selector should be a valid selector.I want to use this selector within jest unit tests to check that a custom element has been defined.