Allow report types to customize the report URL #110
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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