Here is my question in detail: https://stackoverflow.com/questions/78085257/why-doesnt-jsdoms-object-getownpropertynameswindow-include-dom-objects
I have a scenario where Object.getOwnPropertyDescriptor(window, 'HTMLElement') returns a property descriptor but HTMLElement does not exist in Object.getOwnPropertyNames(window). I don't understand how this is possible. Can someone explain that to me?
Here's the output of Object.getOwnPropertyDescriptor(window, 'HTMLElement'):
{
value: [class HTMLElement extends Element],
writable: true,
enumerable: false,
configurable: true
}
FWIW, I am running this in a node environment with JSDOM.