capricorn86 / happy-dom

A JavaScript implementation of a web browser without its graphical user interface
MIT License
3.36k stars 200 forks source link

Support new checkVisibility method on Element #1506

Open saitho opened 2 months ago

saitho commented 2 months ago

Is your feature request related to a problem? Please describe. I'm want to implement a unit test that tests a method working with visibility of HTML elements. That method currently uses jQuery $(el).is(':hidden').

Describe the solution you'd like "checkVisibility" is a new method on HTML elements for checking if an element is hidden. https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility As we're reducing jQuery in our code anyway, it would be great if happy-dom suppports the new method so we can test our functionality. :)

jesperronn commented 1 week ago

@saitho I am looking into a similar problem. Did you have any progress since you reported this?

Can you share your test setup for jQuery/happyDom as a simplified example? This might help maintainers to reproduce.

(disclaimer: i am not a maintainer, just stumbled upon this issue which you reported)

saitho commented 1 week ago

No, I didn't implement the checks for visibility in the test. ^^