Re: [csswg-drafts] [cssom-view] Proposal: add Element.isVisible[toDocument] to detect if element is visible in the document. (#6850)

Regarding the return value of this function: I think I was overthinking it. It seems sufficient to just return a boolean. New proposal:

```
isVisible({dictionary}): bool
```

If you pass nothing in the dictionary it returns true if it has a box and is not skipped by `content-visibility:hidden` ancestors.

If you pass one or more things in the dictionary, it *ands* the return value with those visibility checks. I don't think it makes sense to to check more fine-grained things. If a developer for some obscure reason really wants to distinguish, they can call it multiple times with dictionary arguments.

Unless there are objections I'll add this to CSSOM based on the existing resolution.

-- 
GitHub Notification of comment by chrishtr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6850#issuecomment-1057559368 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 3 March 2022 01:08:25 UTC