Bug 251586 - Support Intersection Observer V2 (isVisible)
Summary: Support Intersection Observer V2 (isVisible)
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Safari 16
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-02-02 07:59 PST by somamine7@gmail.com
Modified: 2024-03-01 08:16 PST (History)
11 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description somamine7@gmail.com 2023-02-02 07:59:31 PST
I'd like to propose that WebKit extend the Intersection Observer API to support the V2 that Chrome has implemented and shipped to production.

V2 of the Intersection Observer API exposes a few simple, but incredibly powerful features to developers: namely, the "isVisible" property. This property lets developers detect whether an element is visible, accounting for not only the element's position, but things like opacity, filters, and transforms.

This simple extension of the Intersection Observer API has effectively solved clickjacking as an attack vector, which has incredibly profound consequences for all kinds of security sensitive applications. Being able to confirm an iFrame is entirely visible to the user, for example, opens up a world of possibility for developers.

Here are a few helpful links about Intersection Observer V2 to help give the needed context:
https://chromestatus.com/feature/5878481493688320
https://github.com/szager-chromium/IntersectionObserver/blob/v2/explainer.md
https://szager-chromium.github.io/IntersectionObserver/demo/cashbomb/hidden/
Comment 1 Radar WebKit Bug Importer 2023-02-03 03:31:45 PST
<rdar://problem/105000796>