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

rootMargin definition uses outdated HTML Standard definition #429

Closed
domfarolino opened this issue May 8, 2020 · 3 comments · Fixed by #448
Closed

rootMargin definition uses outdated HTML Standard definition #429

domfarolino opened this issue May 8, 2020 · 3 comments · Fixed by #448

Comments

@domfarolino
Copy link
Member

https://w3c.github.io/IntersectionObserver/#dom-intersectionobserver-rootmargin:

Offsets applied to the root intersection rectangle, effectively growing or shrinking the box that is used to calculate intersections. Note that rootMargin is only applied for targets which belong to the same unit of related similar-origin browsing contexts as the intersection root.

The HTML Standard mentions that the unit-of-related-similar-origin-browsing-contexts definition has been removed. I'm not sure if there is an equivalent definition that this spec could reference instead, maybe @domenic would know?

@domenic
Copy link

domenic commented May 11, 2020

It's a little hard to figure out what this was originally trying to say, since DOM elements never "belonged to" URSOBCs. In particular I'm wondering if this is trying to translate any implementation-specific notions, such as process, or thread, into spec language? Which could be problematic.

Anyway, my guess as to a reasonable replacement would be the element's relevant agent, which would contain all DOM elements which can access others synchronously, or could potentially do so after document.domain is set.

@szager-chromium
Copy link
Collaborator

"Unit of related similar origin browsing contexts" referred to the connected graph of nested browsing contexts that all belong to the same origin. I think browsing context scope origin can be used instead:

https://html.spec.whatwg.org/multipage/browsers.html#browsing-context-group

@annevk
Copy link
Member

annevk commented Sep 16, 2020

Note #161 which this should probably be duped into as that has more relevant discussion.

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

Successfully merging a pull request may close this issue.

4 participants