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

Processing of intersection observers doesn't match implementations #525

Open
emilio opened this issue Jul 1, 2024 · 2 comments
Open

Processing of intersection observers doesn't match implementations #525

emilio opened this issue Jul 1, 2024 · 2 comments

Comments

@emilio
Copy link
Collaborator

emilio commented Jul 1, 2024

https://w3c.github.io/IntersectionObserver/#update-intersection-observations-algo says:

Let observer list be a list of all IntersectionObservers whose root is in the DOM tree of document. For the top-level browsing context, this includes implicit root observers.

This means that, per spec, if you're in a cross-origin iframe, a new IntersectionObserver() without a root node, is supposed to be processed in the top browsing context.

I don't think that matches what engines do (it's not implementable in Gecko at least).

What gecko does is, it uses the IntersectionObservers current document on construction as the document from where it's processed. That seems to be what WebKit is doing too here.

@szager-chromium do you know what Blink is doing? Should we spec the current / constructor document behavior or was the current language intentional?

@emilio
Copy link
Collaborator Author

emilio commented Jul 1, 2024

cc @smaug----

@emilio
Copy link
Collaborator Author

emilio commented Sep 23, 2024

This was discussed during TPAC. Tentative plan is to adopt WebKit / Gecko behavior and write tests. cc @szager-chromium @rniwa

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

No branches or pull requests

1 participant