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

Is the complexity of cross-frame observation worth it? #173

Open
smfr opened this issue Oct 30, 2016 · 2 comments
Open

Is the complexity of cross-frame observation worth it? #173

smfr opened this issue Oct 30, 2016 · 2 comments

Comments

@smfr
Copy link

smfr commented Oct 30, 2016

Allowing an intersection observer to observe an element in a subframe adds a lot of additional complexity, and risk to the implementation:

  • You have to track layouts and scrolling in subframes, but then "Run the Update Intersection Observations Steps" in some ancestor frame, but then ensure that all the subframes which contain target elements hit by that algorithm are laid out.
  • Lifetimes of IntersectionObservers are tied to lifetimes of elements in a different document

Is there a major use case for cross-document observation?

@szager-chromium
Copy link
Collaborator

Is the complexity any greater than the in the implicit root case (i.e., root is the top-level document, target is in a subframe)?

In the chromium implementation, lifetime management was indeed tricky to get right, but wasn't any trickier for the case you cite than for the implicit root case.

Same comment about ensuring that layout is clean in both ancestor and descendant -- this is just as true for the implicit root case.

@miketaylr
Copy link
Member

@smfr any thoughts? Or should we close this issue?

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

3 participants