Re: [csswg-drafts] Support Cross-Origin iframe use case (#4344)

The CSS Working Group just discussed `Support Cross-Origin iframe use case`, and agreed to the following:

* `RESOLVED: View timelines whose subject is the root element are always inactive (with the expectation we'll give them more behavior later)`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> flackr: with view timelines, you can create an effect when the subject is visible within its nearest ancestor scroller<br>
&lt;TabAtkins> flackr: but in some of the use-cases with our partners, they wanted to do something like intersection observer, where it was looking at its frames' visibility in the outer frame. view-timeline doesn't let you do that<br>
&lt;TabAtkins> flackr: so should it? a view-timeline based on your frame root, giving you the intersection with your embedding frame<br>
&lt;fantasai> TabAtkins: simple example, you haven iframe<br>
&lt;fantasai> TabAtkins: It wants to run a view-timeline-animation based on the iframe's position in the outer page<br>
&lt;fantasai> TabAtkins: relative to the scroller its in<br>
&lt;TabAtkins> fantasai: so basically passing the timeline from outside the iframe into the iframe<br>
&lt;TabAtkins> flackr: this can be cross-origin, so it's not striclty passing "objects"<br>
&lt;TabAtkins> flackr: you are allowed to know when you're intersecting the viewport, via IntersectionObserve33r<br>
&lt;TabAtkins> flackr: maybe we don't want to allow it since it does technically expose more info than IO, at least a single IO<br>
&lt;TabAtkins> flackr: but you can get this information to some granularity by creating several IOs with different offsets<br>
&lt;TabAtkins> fantasai: i can't comment from a security perspective<br>
&lt;TabAtkins> fantasai: from how to do it, maybe say view timelines on the root element are about the root's position in the outer scroller<br>
&lt;TabAtkins> flackr: yeah, that's my thought<br>
&lt;TabAtkins> flackr: if your subject is the root you're observing its psoiition in an outer frame's scroller<br>
&lt;TabAtkins> flackr: but we'd still ahve to figure out if it's okay from a security perspective<br>
&lt;TabAtkins> astearns: so rob's proposal in the issue is to punt for now<br>
&lt;TabAtkins> fantasai: if we think we want to do this, we might want to define that a view-timeline on the root has no effect<br>
&lt;TabAtkins> fantasai: bc in theory you could define a root element with lots of margins and padding and observe its transit across the viewport<br>
&lt;TabAtkins> fantasai: suspect not used<br>
&lt;TabAtkins> flackr: yeah, if you have a root subject and "contain", it's using the root's scroll timeline basically<br>
&lt;TabAtkins> (i think i got that right)<br>
&lt;TabAtkins> flackr: but i'd be supportive of reserving this, today you'd get a timeline that's always inactive<br>
&lt;TabAtkins> TabAtkins: so do the reservation now, punt the feature to after security review<br>
&lt;TabAtkins> fantasai: proposed: view timelines defined on the root element are always inactive<br>
&lt;TabAtkins> flackr: whose subject is the root element<br>
&lt;TabAtkins> astearns: objections?<br>
&lt;TabAtkins> RESOLVED: View timelines whose subject is the root element are always inactive (with the expectation we'll give them more behavior later)<br>
</details>


-- 
GitHub Notification of comment by css-meeting-bot
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4344#issuecomment-2776836246 using your GitHub account


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

Received on Thursday, 3 April 2025 20:22:50 UTC