-
Notifications
You must be signed in to change notification settings - Fork 27
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
Add support for accessing cross-frame entries. #202
base: gh-pages
Are you sure you want to change the base?
Conversation
This adds a Document-Policy configuration point for documents, named "share-performance-timeline-with", which acceps a set of origins. If it is non-empty, then ancestor frames whose origins are contained in that set can access the timeline entries of the child frame, either through a PerformanceObserver, or by passing a boolean flag into the various getEntries methods.
I think this is still missing a piece -- PerformanceObservers shouldn't always get events from child frames; that needs to be conditional on PerformanceObserverInit.includeFrames. Additionally, the way this is written may cause the finite buffers to overflow quickly; I should find a way to avoid that |
This seems generally reasonable. May be good to share this with the WG, and see what folks think of the general shape |
WG is generally supportive (discussed at the 2022-11-10 meeting) One question was brought up about feature detection, and how developers could know whether cross-frame entries are supported at all, if we just use a boolean parameter on After some consideration, I think that developers should be able to detect the presence of this feature by looking for the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's resolve the boolean trap... I think it's material.
Another thing I didn't see here or in the design document is reference to to |
This adds a Document-Policy configuration point for documents, named "share-performance-timeline-with", which acceps a set of origins. If it is non-empty, then ancestor frames whose origins are contained in that set can access the timeline entries of the child frame, either through a PerformanceObserver, or by passing a boolean flag into the various getEntries methods.
Preview | Diff