Intent to Prototype: Element.isVisible method

232 views
Skip to first unread message

Joey Arhar

unread,
Apr 27, 2022, 10:44:45 PM4/27/22
to blink-dev

Contact emails

jar...@chromium.org

Explainer

https://github.com/WICG/display-locking/blob/main/explainers/isvisible.md

Specification

https://drafts.csswg.org/cssom-view/#dom-element-isvisible

Summary

Element.isVisible() returns true if the element is visible, and false if it is not. It checks a variety of factors that would make an element invisible, including visibility, content-visibility, and opacity.



Blink component

Blink>DOM

Motivation

With the addition of content-visibility, there are now several different ways to hide an element. This new method accounts for all of these and can look at state script in the page can't see, such as content-visibility:hidden in the user agent shadow DOM of a closed details element.



Initial public proposal

https://github.com/w3c/csswg-drafts/issues/6850

TAG review

https://github.com/w3ctag/design-reviews/issues/734

TAG review status

Pending

Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Web developers: No signals

Other signals:

Ergonomics

This feature could be used in tandem with content-visibility or details elements. Usage of this API will not make it hard for Chrome to maintain good performance.



Activation

This feature is easy to feature detect and polyfill.



Security

I have no security risks/considerations for this feature.



WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?



Debuggability

This feature does not need any new debugging features.



Is this feature fully tested by web-platform-tests?

Yes

Flag name

--enable-blink-features=isVisible

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/chromium/issues/detail?id=1309533

Estimated milestones

No milestones specified



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5163102852087808

This intent message was generated by Chrome Platform Status.
Reply all
Reply to author
Forward
0 new messages