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

Observing reports (via ReportingObserver) cross-frame #74

Closed
paulmeyer90 opened this issue Apr 12, 2018 · 5 comments
Closed

Observing reports (via ReportingObserver) cross-frame #74

paulmeyer90 opened this issue Apr 12, 2018 · 5 comments

Comments

@paulmeyer90
Copy link
Contributor

Should a ReportingObserver registered to one frame be able to observe reports generated in a (same-origin) subframe of that frame? I think I had always envisioned that it should be able to, but would like to hear the thoughts of others on this.

I'm assuming that for the cross-origin case, this kind of observation doesn't make sense, but I'm open to that discussion also!

@patrickkettner
Copy link
Collaborator

im not against the concept, but I believe the initial plan was to model after PerformanceObserver, which does not do this. Also, it would be fairly trivial to pass a report up the window chain, right?

@paulmeyer90
Copy link
Contributor Author

See this bug which was caused by confusion around this issue: https://bugs.chromium.org/p/chromium/issues/detail?id=865779

@paulmeyer90
Copy link
Contributor Author

As Eric suggested on that bug, I think it would be great to have a new ReportingObserver option (called something like "subframe", "propagate", or "omniscient" :P ?) that sets whether the observer will observe subframes.

@igrigorik
Copy link
Member

I'm not against the concept, but I believe the initial plan was to model after PerformanceObserver, which does not do this.

Yep, and I would really like to keep the API surface aligned between the two.

Also, it would be fairly trivial to pass a report up the window chain, right?

Ish. There's a number of edge cases to consider here, which we started hashing out in w3c/performance-timeline#86. If we can land on a solution for the issues covered in that bug, I think we'll have a good solution that can be applied to both observers.

@clelland
Copy link
Contributor

Closing this; it makes the spec simpler to just surface reports in the document where they are triggered; it means that you don't get reports in ReportingObserver that were not also delivered to the enpoints in the Report-To header; and same-site already have ways to share this information if they want to.

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

5 participants