Open samschurter opened 6 months ago
Is your feature request related to a problem? Please describe. My code uses document.elementsFromPoint(), but happy-dom doesn't provide that API.
document.elementsFromPoint()
happy-dom
Describe the solution you'd like elementsFromPoint is implemented and behaves as described in the spec
elementsFromPoint
Describe alternatives you've considered I have been mocking it manually in my Vite tests:
window.document.elementsFromPoint = vi.fn().mockReturnValue([{ tagName: 'IMG', getBoundingClientRect: () => ({top: 0, left: 0}), width: 256, height: 256, src: 'https:/i-cant-believe-its-not-a-real-url.com/0.png', }]);
Is your feature request related to a problem? Please describe. My code uses
document.elementsFromPoint()
, buthappy-dom
doesn't provide that API.Describe the solution you'd like
elementsFromPoint
is implemented and behaves as described in the specDescribe alternatives you've considered I have been mocking it manually in my Vite tests: