I feel that it would be useful to have an element visibility API – basically browser providing current visibility of the element (not considering screen or parent boundaries, only things like display:none on element or parent) and an event when visibility changes.
Use case:
Lazy initialization with JavaScript. For example, currently if an element is not visible due to its parent, there is no good way to find out when to do the initial sizing. And if it is a web component that might be used in multiple contexts, it is not easily possible to prepare for all possible ways parent visibility can change.
Is it something that has an existing spec in progress?