Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should IOv2 expose more details about why a target isn't visible for same-document case? #3

Open
szager-chromium opened this issue Nov 6, 2018 · 0 comments

Comments

@szager-chromium
Copy link
Owner

If IOv2 is used in a cross-origin iframe, then for privacy/security reasons, we probably can't be any more specific than a simple boolean isVisible flag.

But for the same-origin or same-document case -- where the full DOM is available to script to analyze -- then the privacy and security concerns don't really hold. This is similar to the handling of the rootBounds field of IntersectionObserverEntry.

In the same-origin/same-document case, it may be useful to provide more detailed information about why a target is reported as not visible. This could be, e.g., an enum:

enum VisibilityCheckFailureReason {
kOccluded,
kOpacity,
kTransform,
kFilter
};

We could also provide the Element (or one of the Elements) that occludes the target.

I have heard interest in this feature primarily from ad networks, who typically have their code injected into the top-level browsing context. In that situation, the ad network code doesn't know anything about the host page, and they would like to be able to use IOv2 to identify when pages inadvertently occlude or visually distort ads, for the purpose of working with the publisher to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant