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

Allow report types to customize the report URL #110

Merged
merged 2 commits into from Jul 18, 2018

Conversation

dcreager
Copy link
Member

@dcreager dcreager commented Jul 17, 2018

Before, a report's URL was always the URL of the containing page (or more accurately, of the environment settings object used to queue the report). For some report types, the containing page isn't relevant. For instance, a NEL report describes a network request independent of where or why the request was made. A NEL report's URL should really be the URL of the resource that was requested.

This patch allows report types to provide a custom URL if appropriate. The document URL is a good default, though, so this customization is optional.


Preview | Diff

Before, a report's URL was always the URL of the containing page (or
more accurately, of the environment settings object used to queue the
report).  For some report types, the containing page isn't relevant.
For instance, a NEL report describes a network request independent of
where or why the request was made.  A NEL report's URL should really be
the URL of the resource that was requested.

This patch allows report types to provide a custom URL if appropriate.
The document URL is a good default, though, so this customization is
optional.
Copy link
Member

@igrigorik igrigorik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@dcreager dcreager merged commit d6f71a0 into w3c:master Jul 18, 2018
@dcreager dcreager deleted the custom-urlk branch July 18, 2018 13:24
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 this pull request may close these issues.

None yet

2 participants